[fortran,patch] Remove gfc_status and gfc_status_char

FX Coudert fxcoudert@gmail.com
Sun Apr 6 11:12:00 GMT 2008


Hi all,

Attached patch removes gfc_status() and gfc_status_char() from the  
front-end. They are wrappers to printf() and putchar(), with the  
added side effect that gfc_status() translates its format string.  
They were used for different and unsuitable circumstances :
   - in dump-parse-tree.c, to dump the parse tree; I don't think we  
want to localize this parse tree (actually, that's how I found out  
about this issue: the .po files generated for internationalisation  
are huge due to all the dump-parse-tree strings being marked for  
translation)
   - in gfc_handle_module_path_options(), we call gfc_status() and  
then exit(3), which is equivalent to gfc_fatal_error()
   - in scanner.c, for some commented-out debugging code; I've  
replaced that by calls to printf

For dump_parse_tree.c, I've reworked it to use fprintf(), fputs() and  
fputc() instead of gfc_status() and gfc_status_char(). I've also  
changed the way it is called so that it is passed a FILE pointer,  
which is now stdout making it equivalent to the current behaviour but  
could be something else. (I think it would be better to have the  
option create a myfile.f90.parse-tree file.)

Finally, I've renamed the "verbose" member of gfc_option_t into  
"dump_parse_tree" for clarity; verbose is already the name of the -v  
option.

Bootstrapped, regtested and tested manually with -fdump-parse-tree on  
x86_64-linux, OK to commit?

FX


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump_parse_tree.ChangeLog
Type: application/octet-stream
Size: 725 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080406/f0c0045f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dump_parse_tree.diff
Type: application/octet-stream
Size: 61019 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080406/f0c0045f/attachment-0001.obj>
-------------- next part --------------


-- 
Fran?ois-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/



More information about the Fortran mailing list