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

Re: Convert libiberty to use ISO C prototype style 3/n


 > DJ Delorie <dj@redhat.com> writes:
 > 
 > | > I think it is a logical part of the conversion and there OK.  But,
 > | > you might want to hear from DJ before that.
 > | 
 > | I agree it's appropriate for this conversion.  We may need to
 > | revisit this paragraph of the gcc documentation too:
 > | 
 > |         * Use of ISO C style function definitions.  This warning
 > |         intentionally is _not_ issued for prototype declarations or
 > |         variadic functions because these ISO C features will appear
 > |         in your code when using libiberty's traditional C
 > |         compatibility macros, `PARAMS' and `VPARAMS'.  This warning
 > |         is also bypassed for nested functions because that feature
 > |         is already a GCC extension and thus not relevant to
 > |         traditional C compatibility.
 > 
 > Completely agreed.  I'll prepare a patch for that, onece I'm finished
 > with the conversion.
 > -- Gaby

IIRC, the special exception in -Wtraditional for variable argument
function definitions with VPARAMS was eliminated as of 3.4.x when we
converted the GCC sources to ISO C.  This assumes that only GCC ever
used VPARAMS and -Wtraditional together and IMHO was the wrong way to
go.

Obviously the docs weren't updated.

The exception for PARAMS prototype declarations remains.  Perhaps this
text would be better:

 * Use of ISO C style function definitions.  This warning
   intentionally is _not_ issued for prototype declarations because
   this ISO C feature will appear in your code when using libiberty's
   traditional C compatibility macro `PARAMS'.  This warning is also
   bypassed for nested functions because that feature is already a GCC
   extension and thus not relevant to traditional C compatibility.
 
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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