This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Re: Make lang_specific_driver use cl_decoded_option structures


Am 18.08.2010 22:58, schrieb Joseph S. Myers:
* The Fortran code has an error "overflowed output arg list for %qs"
   that is a call to fatal_error but looks like it should be an
   internal_error instead since if it triggers there is a bug in the
   calculation of how large the new option list should be.  The patch
   does not change this.  (Actually, it would be better just to resize
   dynamically as needed rather than hardcoding a calculation of the
   maximum size that might be needed, and so eliminate this error
   completely.  The same applies in other drivers)

Maybe it would be useful to change this to an internal error to increase the chance that it gets reported. (Though, seemingly no user has encountered this problem so far). I concur that resizing would be the proper solution.


* The Fortran driver had a comment saying "Also, if -v is specified,
   but no other options that do anything special (allowing -V version,
   etc.), remember to add special stuff to make gcc command actually
   invoke all the different phases of the compilation process so all
   the version numbers can be seen.".  Apart from the reference to -V,
   there is nothing special in the Fortran code at all regarding the
   lack of other options with -v.

Could you update the comment?


* The Fortran driver has a comment about "-lg2c -lm" but it always
   appears to use -lgfortran, not -lg2c.  Left unchanged.

That's probably a copy from g77, which used g2c. Could you change this to -lgfortran.


Thanks for your patch - it is fantastic that someone does this janitorial work! (For completeness: The Fortran changes are OK.)

Tobias

fortran:
2010-08-18  Joseph Myers<joseph@codesourcery.com>

	* Make-lang.in (gfortranspec.o): Update dependencies.
	* gfortranspec.c: Include coretypes.h before gcc.h.  Include
	opts.h.
	(MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
	(ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
	(g77_xargc): Make unsigned.
	(g77_xargv): Change to g77_x_decoded_options.
	(g77_newargc): Make unsigned.
	(g77_newargv): Change to g77_new_decoded_options.
	(strings_same, options_same): New.
	(append_arg): Use cl_decoded_option structures.
	(append_option): New.
	(add_arg_libgfortran): New.
	(lang_specific_driver): Use cl_decoded_option structures.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]