This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Convert ada/ to opts.c
Andreas Jaeger wrote:-
> I get this bootstrap failure with your patch:
>
> stage1/xgcc -Bstage1/ -B/opt/gcc/3.4-devel/i686-suse-linux-gnu/bin/ -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common -DHAVE_CONFIG_H -I. -Iada -I/cvs/gcc/gcc -I/cvs/gcc/gcc/ada -I/cvs/gcc/gcc/config -I/cvs/gcc/gcc/../include /cvs/gcc/gcc/ada/misc.c -o ada/misc.o
> /cvs/gcc/gcc/ada/misc.c: In function `gnat_handle_option':
> /cvs/gcc/gcc/ada/misc.c:249: warning: assignment discards qualifiers from pointer target type
> /cvs/gcc/gcc/ada/misc.c:275: warning: enumeration value `N_OPTS' not handled in switch
> make[2]: *** [ada/misc.o] Error 1
Thanks Roger and Andreas. I've applied this.
Neil.
ada:
* misc.c (gnat_handle_option): Fix warnings.
Index: misc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/misc.c,v
retrieving revision 1.52
diff -u -p -b -r1.52 misc.c
--- misc.c 11 Jun 2003 20:23:02 -0000 1.52
+++ misc.c 12 Jun 2003 05:45:37 -0000
@@ -237,6 +237,9 @@ gnat_handle_option (size_t scode, const
switch (code)
{
+ default:
+ return 0;
+
case OPT_I:
q = xmalloc (sizeof("-I") + strlen (arg));
strcpy (q, "-I");
@@ -246,7 +249,7 @@ gnat_handle_option (size_t scode, const
break;
case OPT_fRTS:
- gnat_argv[gnat_argc] = "-fRTS";
+ gnat_argv[gnat_argc] = xstrdup ("-fRTS");
gnat_argc++;
break;