define and single quotes and C++11 vs 14

Jason Mancini jayrusman@hotmail.com
Mon Feb 6 21:49:00 GMT 2017


Is this the expected behavior?  There doesn't seem to be a selective -Wno-* flag for this warning.  C++11 mode rejects the code, while C++14 mode accepts the code, and g++ -E shows Q to be 1'b0 in that case.

source code:
----------------------
#define Q 1'b0
----------------------

# g++-6.3 -Werror -c src.cc -std=c++14
# g++-6.3 -Werror -c src.cc -std=c++11
error: missing terminating ' character [-Werror]
#



More information about the Gcc-help mailing list