On Tue, Apr 25, 2006 at 07:26:56PM -0500, erik quanstrom wrote:
> gcc 4 can be c99 compliant.  
> 
>       gcc '--std=c99' $*
> 
> but that doesn't mean that they removed the extensions.
> 
> linux is dependent on inline assembly, for example.  (i'm not sure why they 
> think it necessiary.)  so a number of their extensions won't go away.  in 
> fact,
> other compilers, like tcc, feel compelled to replicate gnu extensions.

  As a guy who started a port of Sun's compilers to Linux I must attest that
  glibc design is really bad when it comes to GNUisms. While porting I was
  treated to all sorts of junk there: incorrect C language constructs
  (_G_config.h: _G_iconv_t has a flexible array member as a non last member of 
  the union), blatant GNUisms which break anything that doesn't explicitly 
claim 
  to be __GNUC__ (dirent.h: take a look at readdir/readdir64 and ponder on
  what happens when #define readdir readdir64 kicks in but the actual
  structure remains to be dirent) and finally my favorite -- mismatched curly
  brackets in bits/mathcalls.h (around line 356) when a C++ compiler doesn't
  want to lie about being __USE_ISOC99.

  The worst of it is -- on a number of occasions glibc developers stated
  that they have no interest in supporting compilers other than gcc.

  That's precisely why everybody nowdays has to implement gcc quircks and
  pretend to be one by __GNUC__ :-(

Thanks,
Roman.

Reply via email to