
On 9/1/2011 5:43 PM, Daniel James wrote:
On 1 September 2011 05:07, Paul Mensonides<pmenso57@comcast.net> wrote:
1) GCC performs macro expansion and parsing on the expressions of all #if/ #elif/#endif blocks that it encounters when not already skipping because of an outer #if/#endif. It is questionable whether this is what was intended, but it is arguable either way.
I think it was made due to:
The remark refers in the resolution above refers to "my reading of the standard" but does not say which standard is being referred to. Is this part of C99 or C++11 ? I have asked about this on the C++ standard NG and am awaiting an answer. I am surprised by the evaluation of "#elif constant expression" when the corrwesponding #if statament is true because it means that #if - #elif is not equivalent to #if - #else - #if in this particular case, and I am sure many C++ programmers would have expected that the two were indeed equivalent.