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

Re: Question on -Werror usage in Makefiles...

"Zack Weinberg" <> writes:

> Andreas Jaeger <> writes:
>>> Digging deeper into this, I see that the following should do the trick
>>> - but doesn't:
>>> SYSCALLS.c.X-warn = -Wno-error
>>> GCC_CFLAGS should include WARN_CFLAGS for this to work.
>>> I'm testing now the appended patch.  Ok to commit this version if it
>>> passes bootstrap on x86_64-linux-gnu?
>> My change adds STRICT_WARN for the files which then enables additional
>> warnings.  I'm not sure whether we want this :-(
> No, I don't think we do, at least not yet.  I suggest you add
>  $($@-warn)
> directly to GCC_CFLAGS.  That will make SYSCALLS.c.X-warn = -Wno-error
> work, without triggering additional warnings.

That would have been to easy ;-), thanks for pointing me in that

I'm testing the appended patch with a full bootstrap on
x86_64-linux-gnu now.  I've tested it already with C only and don't
expect a surprise - ok if it passes bootstrap?

Btw. I have to add -Wno-error (or alternatively -fno-builtin) to the
-Wno-strict-prototypes (-Wno-old-style-definitions was not enough,
Kaveh), otherwise I get on x86_64-linux-gnu these:

SYSCALLS.c:1458: warning: conflicting types for built-in function 'vfprintf'
SYSCALLS.c:1464: warning: conflicting types for built-in function 'vprintf'
SYSCALLS.c:1465: warning: conflicting types for built-in function 'vsprintf'
make: *** [SYSCALLS.c.X] Error 1


2003-11-02  Andreas Jaeger  <>
	    Zack Weinberg  <>

	* (GCC_CFLAGS): Allow blacklisting of warnings.
	(SYSCALLS.c.X-warn): Suppress warnings.

Index: gcc/
--- gcc/	2 Nov 2003 09:34:47 -0000	1.1189
+++ gcc/	2 Nov 2003 15:50:29 -0000
@@ -187,6 +187,8 @@ gengtype-yacc.o-warn = -Wno-error
 c-parse.o-warn = -Wno-error
 # flex output may yield harmless "no previous prototype" warnings
 gengtype-lex.o-warn = -Wno-error
+# SYSCALLS.c misses prototypes
+SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
 # All warnings have to be shut off in stage1 if the compiler used then
 # isn't gcc; configure determines that.  WARN_CFLAGS will be either
@@ -287,7 +289,7 @@ GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./x
 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
 # It omits XCFLAGS, and specifies -B./.
 # It also specifies -isystem ./include to find, e.g., stddef.h.
+GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) @WERROR@ $($@-warn) -isystem ./include $(TCFLAGS)
 # ---------------------------------------------------
 # Programs which produce files for the target machine

 Andreas Jaeger,,
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature

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