This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: One warning less: declaration of cp_printer
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: One warning less: declaration of cp_printer
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 21 Sep 2000 07:25:11 +0200
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <u88zsmv4a5.fsf@gromit.rhein-neckar.de>
Andreas Jaeger <aj@suse.de> writes:
| Compiling the curren gcc I got the following error:
| /var/home/aj/cvs/gcc/gcc/cp/error.c:93: warning: function declaration isn't a prototype
|
| A grep for cp_printer showed the following:
|
| errfn.c:29:/* cp_printer is the type of a function which converts an argument into
| errfn.c:30: a string for digestion by printf. The cp_printer function should deal
| errfn.c:34:typedef const char *cp_printer PARAMS ((tree, int));
| errfn.c:35:extern cp_printer * cp_printers[256];
| errfn.c:76: cp_printer * function;
| errfn.c:106: function = cp_printers[(int)*f];
| error.c:93:typedef const char *cp_printer ();
|
| IMO we should move the typedef and the extern into an include file.
| Is cp-tree.h the right file to use? Here's a patch, I've bootstrapped
| on linux/i686.
|
| Andreas
|
| 2000-09-20 Andreas Jaeger <aj@suse.de>
|
| * errfn.c: Move declaration of cp_printer and cp_printers to ...
| * cp-tree.h: ... here.
|
| * error.c: Remove declaration of cp_printer.
Hmm, cp_printer and associates will disappear shortly.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com