----- Message d'origine ---- De : Andi Hellmund <mail@xxxxxxxxxxxxxxxx> à : charfi asma <charfiasma@xxxxxxxx> Cc : Philip Herron <redbrain@xxxxxxxxxxx>; Ian Lance Taylor <iant@xxxxxxxxxx> Envoyà le : Sam 2 octobre 2010, 18h 30min 16s Objet : Re: Tr : Re : Re : Re : add a new gcc fe based on gcalc or sample_fe On 09/29/2010 11:56 AM, charfi asma wrote: > > >> ----- Message d'origine ---- >> > >> De : Ian Lance Taylor<iant@xxxxxxxxxx> >> à : charfi asma<charfiasma@xxxxxxxx> >> Cc : gcc-help@xxxxxxxxxxx >> Envoyà le : Lun 27 septembre 2010, 18h 44min 35s >> Objet : Re: Re : add a new gcc fe based on gcalc or sample_fe >> >> charfi asma<charfiasma@xxxxxxxx> writes: >> >> >> >>> I tried to modify the language by exporting LANG env var to en_US.UTF-8 >>> I even add those lines in my .bash_profile file and reboot my computer: >>> >>> export LC_ALL=en_US.UTF-8 >>> export LANG=en_US.UTF-8 >>> export LC_CTYPE=en_US.UTF-8 >>> >>> [root@is010178 charfi]# echo $LANG >>> en_US.UTF-8 >>> >>> but I still have errors in french >>> >>> >> Odd. Is LC_MESSAGES set in the environment? >> >> >> >> >>> 1. when I git clone the gcc-dev directory and build the UML front end for the >>> first time I get this error: >>> >>> >>> gcc -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual >>> -Wstrict-prototypes >>> >>> -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long >>> -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition >>> -Wc++-compat >>> >>> -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/gengtype \ >>> build/gengtype.o build/errors.o build/gengtype-lex.o >>> build/gengtype-parse.o ../build-i686-pc-linux-gnu/libiberty/libiberty.a >>> make[2]: *** Pas de rÃgle pour fabriquer la cible  ../../gcc-dev/gcc/uml/u >>> > Â, > >>> >>> >> >> >>> nÃcessaire pour  s-gtype Â. ArrÃt. >>> >>> --> In english it becomes: no rule to build the target  >>> ../../gcc-dev/gcc/uml/u >>> >>>  required for  s-gtype Â. Stop >>> >>> >> This seems to be looking for a file gcc/uml/u. That seems odd. Is that >> exactly what it says? Does uml/u appear in the Makefile? >> >> I don't know anything about the UML frontend and it is not part of >> standard gcc; have you tried asking the author? >> >> >> > Hey Asma, > >> May be I should mention that I do not use any lexer or parser, is it normal >> that >> ( in the error message) gcc seems looking for build/gengtype.o build/errors.o >> build/gengtype-lex.o ? >> >> > I have no idea what's wrong with your code. Maybe, you could send me > your code, but please only the front-end and not the complete gcc source > tree :-) I could then try to build your front-end on my system and check > what's wrong... > > Hello, > > you find attached my uml front end (even if I am so dummy that I wanted to send > you all the gcc tree, I can not because it is too big ;) > > I tried also to follow the sample_fe (not the gcalc) cause sample_fe did not > require any lexer or parser but I get this error. > > In file included from ../../gcc-dev/gcc/sample_fe/gsfe.c:3: > ../../gcc-dev/gcc/gcc.h:45: attention : âstruct cl_decoded_optionâ declared > inside parameter list > ../../gcc-dev/gcc/sample_fe/gsfe.c:9: erreur: two or more data types in > declaration specifiers > ../../gcc-dev/gcc/sample_fe/gsfe.c:9: erreur: conflicting types for > âlang_specific_driverâ > ../../gcc-dev/gcc/gcc.h:44: note: previous declaration of >âlang_specific_driverâ > > > was here > make[2]: *** [sample_fe/gsfe.o] Erreur 1 > make[2]: leave the directory  /export/home/charfi/Bureau/build_sfe2/gcc  > make[1]: *** [all-gcc] Erreur 2 > make[1]: leave the directory  /export/home/charfi/Bureau/build_sfe2  > make: *** [all] Erreur 2 > > > of couse I do > - change the GTY in the driver to suit the change in GCC4.6 (GTY must be > declared before identifier) > > - change the prototype of lang_specific_driver ( struct cl_decoded_option > **in_decoded_options ATTRIBUTE_UNUSED, unsigned int *in_decoded_options_count > ATTRIBUTE_UNUSED, int *in_added_libraries ATTRIBUTE_UNUSED) rather than > > lang_specific_driver (int *in_argc, const char *const **in_argv, int > *in_added_libraries ATTRIBUTE_UNUSED) > > to recreate the error, so can try to compile the sample_fe in the gcc-dev >(4.6). > > thanks > > Asma > > > Hey Asma, please find attached a version of your uml front-end which "works" with 4.6! By saying "works", I just mean that it compiles correctly, but I didn't look closely at the logic of your code. So, please give it a try in your Cygwin environment ... Best regards, Andi Hello Andi, thank you for your help, I build this fe in my environment (but I am not using Cygwin, I am using the shell of my mandriva 2010) and it works (configure, make make install without errors ;) but when I compile a file "test.uml" using the guml driver, I get this error: I al trying only to transform a main function to generic (In my file.uml I put only: int main() {return 0;} [charfi@is010178 test_gcalc]$ guml test.uml -fdump-tree-all Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <early_local_cleanups> <whole-program> <inline>Assembling functions: uml1: internal compiler error: in cgraph_mark_reachable_node, at cgraph.c:1687 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I think that there is sth missing that said that my node is reachable, the error is occuring in the function "cgraph_mark_reachable_node" any idea ? thanks Asma