You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by "Thorsten Schöning (JIRA)" <lo...@logging.apache.org> on 2014/02/10 14:35:19 UTC
[jira] [Resolved] (LOGCXX-319) Please make sure that the LOG4CXX_*
macro's can be used as ordinary statements.
[ https://issues.apache.org/jira/browse/LOGCXX-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Schöning resolved LOGCXX-319.
--------------------------------------
Resolution: Fixed
I applied the patch to trunk, with small changes because it didn't apply cleanly else.
> Please make sure that the LOG4CXX_* macro's can be used as ordinary statements.
> -------------------------------------------------------------------------------
>
> Key: LOGCXX-319
> URL: https://issues.apache.org/jira/browse/LOGCXX-319
> Project: Log4cxx
> Issue Type: Improvement
> Affects Versions: 0.10.0
> Reporter: Bart Van Assche
> Assignee: Curt Arnold
> Attachments: conditional-logging.cpp, log4cxx-logmacros.patch
>
>
> The current definition of the LOG4CXX_* macro's is dubious -- these macro's can trigger unexpected compiler errors. The attached test program results in the following compiler output:
> $ LC_ALL=C g++ -o conditional-logging -I/usr/local/include -Wall -Werror -W conditional-logging.cpp -L/usr/local/lib -llog4cxx
> conditional-logging.cpp: In function 'int main(int, char**)':
> conditional-logging.cpp:8: error: 'else' without a previous 'if'
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)