On Tue, 22 Feb 2005, Devang Patel wrote:

> Would it be OK, if this warnings are disabled for system headers ?

What is the built-in function involved and what (and why) is the different 
system header type?  Is this a case where a system reuses a nonstandard 
name GCC has built in for an entirely different purpose?

We already are meant to have some laxity in matching the types of built-in 
functions to those of system header declarations (to allow both for 
pre-ISO-C systems and for not knowing within GCC what type FILE is).

Disabling this warning for system headers may well make sense - but it 
would lead to users getting / not getting the built-in according to 
whether the particular translation unit happened to include that header, 
so I'd like to understand the actual problem.

I think the fact that a warning is disabled in a system header is testable 
in the gcc.dg testsuite: have a .c file include a .h file, the .h file 
containing the offending declaration after #pragma GCC system_header.  
This test should fail before your patch and pass afterwards.  What you 
can't so readily test in such testcases is for diagnostics that are 
*meant* to appear in the system header, as DejaGnu seems only to look at 
dg-error/dg-warning annotations in the main file and interprets all line 
numbers in diagnostics as referring to the main file without regard to the 
file named in the diagnostic.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    [EMAIL PROTECTED] (personal mail)
    [EMAIL PROTECTED] (CodeSourcery mail)
    [EMAIL PROTECTED] (Bugzilla assignments and CCs)

Reply via email to