This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: cpperror.c won't compile


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.  */




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