const bugs

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Oct 9 07:48:00 GMT 2001


 > From: Richard Henderson <rth@redhat.com>
 > 
 > On AIX 4.3.3 with native cc (don't know how to get the version):
 > 
 > "c-parse.y", line 680.43: 1506-068 (W) Operation between types "unsigned char*" and "const unsigned char*" is not allowed.
 > "c-parse.y", line 2780.1: 1506-343 (S) Redeclaration of init_parse differs from previous declaration on line 2646 of "/es/scratch/rth/gcc/src/gcc/tree.h".
 > "c-parse.y", line 2780.1: 1506-050 (I) Return type "unsigned char*" in redeclaration is not compatible with the previous return type "const unsigned char*".
 > "c-parse.y", line 2848.30: 1506-196 (W) Initialization between types "unsigned char*" and "const unsigned char*" is not allowed.
 > r~

I'm pretty sure this isn't related to any changes I made recently, and
I don't have access to this type of platform.  Still, I did a cross
compile from solaris to rs6000-ibm-aix4.3.3.0 and it built c-parse.o
without any const warnings from the gcc used to compile it.

What version of bison did you use to generate c-parse.c?
(I used v1.28.)


This error reminds me of something I thought Mark already fixed by
putting the const hacks in acconfig.h specifically for AIX and bison
generated files.  I.e. the bison output defines away const in the
middle of itself so you get mismatched definitions.

See: http://gcc.gnu.org/ml/gcc-patches/2001-01/msg01949.html

Why isn't the above fix doing the right thing for you on AIX?

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions



More information about the Gcc-bugs mailing list