Hello all, References: http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01742.html http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01536.html http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01452.html and others linked from them. After having separately commited the removal of location_s and having taken account Laurynas's comments http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01452.html I am attaching a patch on gengtype adding a real input_file structure relative to trunk rev 165733. ### gcc/ChangeLog entry ### 2010-10-20 Basile Starynkevitch Jeremie Salvucci * gengtype.c (plugin_files, gt_files, this_file, system_file): Change type to input_file. (get_file_basename, get_file_realbasename) (get_file_srcdir_relative_path, get_file_langdir): Change argument type to input_file. (error_at_line): Use input_file. (lang_dir_names, num_lang_dirs): Not static anymore. (get_lang_bitmap, set_lang_bitmap): Moved to gengtype.h. (read_input_file_name, read_input_list, note_variable) (create_field_all, get_file_realbasename) (get_file_srcdir_relative_path, get_file_basename) (get_file_langdir, get_file_gtfilename) (get_output_file_with_visibility, get_output_file_name) (put_mangled_filename, walk_type, get_output_file_for_structure) (parse_program_options) (struct flist): Use input_file. (input_file_htab): Add variable. (input_file_by_name, htab_hash_inputfile, htab_eq_inputfile): Added functions. (main): Initialize input_file_htab and this_file and system_file, use input_file. * gengtype.h (struct input_file_st, input_file): Add struct and type. (CHECK_INPUT_FILE_MAGIC): Added macro. (gt_files, num_gt_files, this_file, system_file): Moved from gengtype.c and declared as input_file-s. (input_file_by_name, get_file_srcdir_relative_path) (get_lang_bitmap, set_lang_bitmap) (get_output_file_with_visibility, get_output_file_name): Ditto. (get_input_file_name): New inlined function. (struct fileloc): Use input_file. (lang_dir_names, num_lang_dirs): Moved from gengtype.c. * gengtype-lex.l: Include errors.h. (yybegin): Use input_file_by_name. * gengtype-parse.c: Includes errors.h. (parse_error): Use input_file. (type): Counts the anonymous pseudo-identifiers. * Makefile.in (gengtype-lex.o, gengtype-parse.o): Depends upon errors.h ##### Ok for trunk? PS. I might not have time to send more patches before the GCC Summit next week (my slides are unfinished). -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***