This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/11233] -pedantic accepts missing/empty macro argument
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2003 05:46:49 -0000
- Subject: [Bug preprocessor/11233] -pedantic accepts missing/empty macro argument
- References: <20030618104923.11233.h.b.furuseth@usit.uio.no>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11233
neil at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From neil at gcc dot gnu dot org 2003-06-19 05:46 -------
a() is a macro invocation with a single empty argument, so there is no constraint
violation and -pedantic needn't do anything.
As you point out it is undefined behaviour. In general, we don't warn about
undefined or non-portable behaviour with -pedantic; it would tend to get its own
-W switch. We could add one for this case; but yours is the first request we've
ever received; I'm not convinced it's worthwhile.