This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/12607] preprocessor fails to diagnose an undefined ## result


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12607



------- Additional Comments From sebor at roguewave dot com  2003-10-16 16:18 -------
While talking to HP about their bugs in operator ## it came up that the program
below relies on undefined behavior since the order of evaluation of the operator
is unspecified. I think it might be useful to issue a portability warning in
this case when -Wall is on the command line.

$ cat t.cpp && gcc -Wall -E t.cpp
#define CAT3(a, b, c)   a ## b ## c

CAT3 (-, >, *)
# 1 "t.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "t.cpp"


->*


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]