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

Bison vs. const vs. AIX



On AIX, using `cc' to bootstrap doesn't work.  The reason is that in
that `cc' supports `const', but doesn't define __STDC__.  So, all of
our headers use `const', but in c-parse.c, Bison does:

  #ifndef __cplusplus
  #ifndef __STDC__
  #define const
  #endif
  #endif

Then, we get const-mismatches in the body of c-parse.c.

I don't see a generic way to fix this problem.  I was going to
duplicate the Bison logic in system.h, but that fails if the compiler
rejects multiple definitions of the same macro, which some compilers
do.  (Note that Bison is not polite enough to have wrapped its
definition in `#ifndef const'.)

Does anyone see a way to fix this problem?  Otherwise, we need to
force the bootstrap compiler to be `xlc', rather than `cc', on AIX.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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