lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On 5 Oct 2006, at 00:29, Sam Roberts wrote:

On Wed, Oct 04, 2006 at 05:51:36PM -0400, Glenn Maynard wrote:
On Wed, Oct 04, 2006 at 02:31:49PM -0700, Sam Roberts wrote:
Try without -pedantic. The only purpose of -pedantic is to make some
code NOT compile, and you want lposix.c to compile.

The gcc documentation claims -pedantic only adds warnings, not errors.
I guess the glibc folks are detecting the switch, and using it for
things it wasn't meant for?

I have no idea if/when it became useful :-), it wasn't originally meant
to be:

  This option is not intended to be useful; it exists only to satisfy
  pedants who would otherwise claim that GCC fails to support the ANSI
  standard.

  - http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_2.html#SEC8

I like to summarise -ansi and -pedantic in the following way:

-ansi _enables_ the compilation of "all" ISO C compliant code (that is, it moves GCC extensions out of the namespace reserved for use by the programmer).

-pedantic stops you from accidentally using GCC extensions and therefore gives you a shot at being able to use a different compiler later.

The GCC maintainers live in a world where there is no feasible reason to ever use another C compiler, so in their opinion, if GCC can compiler some code then why should you care if some other compiler can't?

drj