This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cpperror.c won't compile
- To: Robert Lipe <robertlipe at usa dot net>
- Subject: Re: cpperror.c won't compile
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Wed, 27 Jan 1999 12:14:00 -0500
- CC: egcs at cygnus dot com, bothner at cygnus dot com, egcs-patches at cygnus dot com
- Organization: Cygnus Solutions Canada Ltd
- References: <19990127101500.A15510@rjlgemini.dgii.com>
I added the prototype to cpplib.h and installed it.
Dave
Robert Lipe wrote:
> With gcc, this is merely a warning. With other compilers, it's an error.
>
> Since there is no forward declaration for cpp_notice(), it follows the
> "implicit int" rule. Then it comes along and declares it as a function
> returning void.
>
> Whether it should be prototyped in cpperror.c or in cpplib.h is left as
> an exercise for those that maintain cpp.
>
> Index: cpperror.c
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/cpperror.c,v
> retrieving revision 1.12
> diff -u -p -r1.12 cpperror.c
> --- cpperror.c 1999/01/27 01:42:05 1.12
> +++ cpperror.c 1999/01/27 16:12:04
> @@ -32,6 +32,8 @@ Foundation, 59 Temple Place - Suite 330,
> #include "cpplib.h"
> #include "intl.h"
>
> +void cpp_notice VPROTO ((const char *msgid, ...));
> +
> /* Print the file names and line numbers of the #include
> commands which led to the current file. */