On Saturday, April 9, 2011 12:22:00 PM UTC-4, Matt P. Dz. wrote:
> From N3242 (draft):
>
> "16.8 Predefined macro names [cpp.predefined]
>
> 1 The following macro names shall be defined by the implementation:
> __cplusplus
> The name __cplusplus is defined to the value 201103L when compiling a
> C++ translation unit.155
> 155) It is intended that future versions of this standard will replace
> the value of this macro with a greater value. Non-conforming
> compilers should use a value with at most five decimal digits."
GCC 4.6 seems define __cplusplus as 1. Does this quailify as a bug?
$ cat main.cpp
#include <iostream>
int main() { std::cout << __cplusplus << std::endl; }
$ make
g++ -std=c++0x -pedantic -Wall -I. -o main.o -c main.cpp
g++ -o main main.o
$ ./main
1
$ g++ --version
g++ (GCC) 4.6.0
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus