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]

Re: getopt declaration in getopt.h

 > From: (Richard Kenner)
 >     Yes, see my unreviewed patch from Oct:
 >     Would you please consider approving it?
 > The problem, of course, is that if the function is *not* defined in a
 > system header, you'll get the opposite warning, but I agree this is
 > probably better, so it's OK to install.

I'm pretty sure we won't get the opposite warning.  (I guess I didn't
explain myself well enough in the original posting.)

None of the "target" files actually use getopt or include getopt.h.
We're getting getopt.h indirectly and unnecessarily via the platform's
system headers which sometimes include getopt.h themselves.  And
because of the -I flags we use to compile gcc, we get our local gnu
getopt.h instead of the platform's copy.

Thus, since we don't need getopt in the first place, we won't get the
opposite warning (I assume you meant something like 'implicit
declaration of getopt'.  I'm pretty sure that won't appear.)  Telling
gnu getopt.h to omit the no-arg prototype will work just fine.

I'll clarify the comments and check it in.

Kaveh R. Ghazi			Engagement Manager / Project Services		Qwest Internet Solutions

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