This is the mail archive of the gcc@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] |
Other format: | [Raw text] |
On Thu, 2009-06-25 at 15:28 -0700, Ian Lance Taylor wrote: > Richard Guenther <richard.guenther@gmail.com> writes: > > >> I guess this has to do with reserved word conflict on "new": > >> > >> << > >> tree > >> substitute_in_type (tree t, tree f, tree r) > >> { > >> tree new; > >>>> > >> > >> Do you have some way to deal with this? > > > > Use a non-reserved identifier. I guess on trunk Ada doesn't build > > with -Wc++-compat, does it? > > Interesting. I've been testing my -Wc++-compat patches with full > bootstraps including Ada, but I just looked at my make log and it does > indeed appear that -Wc++-compat doesn't make it onto the Ada files. > > It seems to be because of this line in ada/gcc-interface/Make-lang.in: > > ada-warn = $(ADA_CFLAGS) $(WERROR) > > The other languages use > > DIR-warn = $(STRICT_WARN) > > which is what brings in -Wc++-compat. What is the way forward: fixing in some way the Ada Makefile? Or doing search and replace in case of keyword/identifier conflict? If search/replace, do AdaCore people have an opinion on the best way to proceed to avoid maintenance issues in the various trees? (eg: commit of those trivial patches directly on trunk or on AdaCore tree then trunk?) I don't know much about C++/C compatibilities and the way to solve them choosen on the gcc-in-cxx branch, is there a document somewhere? Next error is related to enum in for loop: g++ -c -g -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -fno-common -DHAVE_CONFIG_H -I.. -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4//include -I/opt/cfarm/mpfr-2.4.1//include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/gcc/ada/gcc-interface/misc.c -o ada/misc.o ../../gcc/gcc/ada/gcc-interface/misc.c: In function 'void enumerate_modes(void (*)(int, int, int, int, int, int, unsigned int))': ../../gcc/gcc/ada/gcc-interface/misc.c:734: error: invalid conversion from 'int' to 'machine_mode' ../../gcc/gcc/ada/gcc-interface/misc.c:734: error: no 'operator++(int)' declared for postfix '++', trying prefix operator instead ../../gcc/gcc/ada/gcc-interface/misc.c:734: error: no match for 'operator++' in '++i' << void enumerate_modes (void (*f) (int, int, int, int, int, int, unsigned int)) { enum machine_mode i; for (i = 0; i < NUM_MACHINE_MODES; i++) >> Another kind of error on struct declarations: << g++ -c -g -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -fno-common -DHAVE_CONFIG_H -I.. -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4//include -I/opt/cfarm/mpfr-2.4.1//include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/gcc/ada/gcc-interface/trans.c -o ada/trans.o ../../gcc/gcc/ada/gcc-interface/trans.c:111: error: conflicting declaration 'typedef struct parm_attr* parm_attr' ../../gcc/gcc/ada/gcc-interface/trans.c:103: error: 'struct parm_attr' has a previous declaration as 'struct parm_attr' >> Last error is on void* arithmetic: << g++ -c -g -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -fno-common -Wno-error -DHAVE_CONFIG_H -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4//include -I/opt/cfarm/mpfr-2.4.1//include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber \ -I. -Iada -I../../gcc/gcc -I../../gcc/gcc/ada -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4//include -I/opt/cfarm/mpfr-2.4.1//include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber -fno-omit-frame-pointer ../../gcc/gcc/ada/tracebak.c -o ada/tracebak.o In file included from ../../gcc/gcc/ada/tracebak.c:396: ../../gcc/gcc/ada/tb-gcc.c: In function '_Unwind_Reason_Code trace_callback(_Unwind_Context*, uw_data_t*)': ../../gcc/gcc/ada/tb-gcc.c:86: error: pointer of type 'void *' used in arithmetic >> Patch welcomed as these three are not obvious to me :). I did "touch xx.o" to get past and with the quick search/replace of new/class/template patch below it then tried to link libbackend.o. Thanks in advance, Laurent
Attachment:
patch-ada-gcc-in-cxx-new_class_template.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |