This is the mail archive of the gcc@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]

Re: __VA_ARGS__ patch for cccp.c


wilson@cygnus.com (Jim Wilson) writes:

> Mon Mar  9 18:13:09 1998  Jim Wilson  <wilson@cygnus.com>
> 
> 	* cccp.c (create_definition): If pedantic, call pedwarn for macro
> 	varargs feature.

I fear this will create problems.  In the system headers (like gcc
headers or glibc headers) this extension should be allowed even if
pedenatic is enabled.  Only user-level headers should be limited.  So,
the `if' should include an expression saying whether this is a system
header or not.  There is already a variable for this (it is for
handling a similar situation for #include_next) so please use this.

I haven't examined the details but in cccp.c around line 4234 there is

	if (pedantic && !instack[indepth].system_header_p)

used.

-- Uli
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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