Reorganise cc command line parsing
Nick Clifton
nickc@cygnus.com
Thu Sep 30 23:58:00 GMT 1999
Hi Jeff,
I have now applied this patch. (Together with Dave Brolley's patch
to remove the now redundant cpplib options in documented_lang_options[] ).
: You might want to follow-up with a patch that adds comments to the
: independent and language dependent decoders indicating that the
: language dependent decoder must not complain about options it does
: not understand (instead leaving that to the language independent
: coder, right?)
You mean like the patch below ?
(In a couple of cases I have not followed the GNU conding convention
for comments, but stuck with the convention used in the file being
patched. I am not sure if this was the correct thing to do).
Since this patch is just adding comments I am going to apply it
straight away. If there are any problems the patch can always be
reverted.
Cheers
Nick
1999-09-20 Nick Clifton <nickc@cygnus.com>
* c-decl.c (c_decode_option): Extend comment.
Index: c-decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-decl.c,v
retrieving revision 1.76
diff -p -r1.76 c-decl.c
*** c-decl.c 1999/09/10 10:35:48 1.76
--- c-decl.c 1999/09/20 14:15:38
*************** int warn_multichar = 1;
*** 454,460 ****
int dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
/* Decode the string P as a language-specific option for C.
! Return the number of strings consumed. */
int
c_decode_option (argc, argv)
--- 454,461 ----
int dollars_in_ident = DOLLARS_IN_IDENTIFIERS;
/* Decode the string P as a language-specific option for C.
! Return the number of strings consumed. Should not complain
! if it does not recognise the option. */
int
c_decode_option (argc, argv)
1999-09-20 Nick Clifton <nickc@cygnus.com>
* decl.c (lang_decode_option): Extend comment.
Index: cp/decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.258
diff -p -r1.258 decl2.c
*** decl2.c 1999/09/16 17:48:20 1.258
--- decl2.c 1999/09/20 14:15:39
*************** lang_f_options[] =
*** 532,538 ****
/* Decode the string P as a language-specific option.
Return the number of strings consumed for a valid option.
! Otherwise return 0. */
int
lang_decode_option (argc, argv)
--- 532,539 ----
/* Decode the string P as a language-specific option.
Return the number of strings consumed for a valid option.
! Otherwise return 0. Should not complain if it does not
! recognise the option. */
int
lang_decode_option (argc, argv)
1999-09-20 Nick Clifton <nickc@cygnus.com>
* lang.c (lang_decode_option): Extend comment.
Index: ch/lang.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/ch/lang.c,v
retrieving revision 1.8
diff -p -r1.8 lang.c
*** lang.c 1999/08/29 13:44:41 1.8
--- lang.c 1999/09/20 14:15:39
*************** GNU_xref_end ()
*** 161,166 ****
--- 161,167 ----
/*
* process chill-specific compiler command-line options
+ * do not complain if the option is not recognised
*/
int
lang_decode_option (argc, argv)
1999-09-20 Nick Clifton <nickc@cygnus.com>
* lang.c (lang_decode_option): Extend comment.
Index: java/lang.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/lang.c,v
retrieving revision 1.31
diff -p -r1.31 lang.c
*** lang.c 1999/08/31 02:16:27 1.31
--- lang.c 1999/09/20 14:15:39
*************** static int dependency_tracking = 0;
*** 148,153 ****
--- 148,154 ----
/*
* process java-specific compiler command-line options
+ * return 0, but do not complain if the option is not recognised
*/
int
lang_decode_option (argc, argv)
More information about the Gcc-patches
mailing list