* Re: -Wimplicit
2002-11-04 7:42 ` -Wimplicit Daniel Jacobowitz
@ 2002-11-04 9:12 ` Elias Athanasopoulos
2002-11-09 4:36 ` -Wimplicit Neil Booth
1 sibling, 0 replies; 4+ messages in thread
From: Elias Athanasopoulos @ 2002-11-04 9:12 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb, gcc-bugs
Hi Daniel,
On Mon, Nov 04, 2002 at 10:42:52AM -0500, Daniel Jacobowitz wrote:
> On Mon, Nov 04, 2002 at 06:57:51PM +0200, Elias Athanasopoulos wrote:
> > Hi all,
> >
> > Why gdb builts with -Wimplicit? With gcc from CVS I get:
> >
> > cc1: warning: "-Wimplicit" is valid for C++ but not for C/ObjC
>
> That's a bug in GCC then; it's a valid warning in C.
I agree. It seems that the bug introduced in this patch:
http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00214.htmli
In the lines:
+ OPT("Wimplicit", CL_CXX, OPT_Wimplicit) \
+ OPT("Wimplicit-function-declaration", CL_C, OPT_Wimplicit_function_decl) \
+ OPT("Wimplicit-int", CL_C, OPT_Wimplicit_int) \
Elias
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: -Wimplicit
2002-11-04 7:42 ` -Wimplicit Daniel Jacobowitz
2002-11-04 9:12 ` -Wimplicit Elias Athanasopoulos
@ 2002-11-09 4:36 ` Neil Booth
1 sibling, 0 replies; 4+ messages in thread
From: Neil Booth @ 2002-11-09 4:36 UTC (permalink / raw)
To: Elias Athanasopoulos, gdb; +Cc: gcc-patches
Daniel Jacobowitz wrote:-
> > Why gdb builts with -Wimplicit? With gcc from CVS I get:
> >
> > cc1: warning: "-Wimplicit" is valid for C++ but not for C/ObjC
>
> That's a bug in GCC then; it's a valid warning in C.
I'm applying this as obvious.
Neil.
* c-opts.c (COMMAND_LINE_OPTIONS): Fix -Wimplicit.
Index: c-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.23
diff -u -p -r1.23 c-opts.c
--- c-opts.c 21 Oct 2002 20:24:57 -0000 1.23
+++ c-opts.c 9 Nov 2002 12:31:25 -0000
@@ -148,7 +148,7 @@ static void sanitize_cpp_opts PARAMS ((v
OPT("Wformat-y2k", CL_ALL, OPT_Wformat_y2k) \
OPT("Wformat-zero-length", CL_C, OPT_Wformat_zero_length) \
OPT("Wformat=", CL_ALL | CL_JOINED, OPT_Wformat_eq) \
- OPT("Wimplicit", CL_CXX, OPT_Wimplicit) \
+ OPT("Wimplicit", CL_ALL, OPT_Wimplicit) \
OPT("Wimplicit-function-declaration", CL_C, OPT_Wimplicit_function_decl) \
OPT("Wimplicit-int", CL_C, OPT_Wimplicit_int) \
OPT("Wimport", CL_ALL, OPT_Wimport) \
^ permalink raw reply [flat|nested] 4+ messages in thread