This is the mail archive of the gcc-patches@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: One warning less: declaration of cp_printer


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

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