This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47650] New: wrong output of print_generic_decl() called from a plugin
- From: "joe at mcknight dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 8 Feb 2011 19:08:48 +0000
- Subject: [Bug c/47650] New: wrong output of print_generic_decl() called from a plugin
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47650
Summary: wrong output of print_generic_decl() called from a
plugin
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: joe@mcknight.de
While testing how to parse C and C++ code for function prototypes from a plugin
(see http://gcc.gnu.org/ml/gcc/2010-12/msg00179.html)
I noticed that print_generic_decl() seems to output wrong data.
Consider the following function definition:
------------------
void barfunc (int foo, int abc, ... ) {
}
------------------
This outputs "static void barfunc (int);" but the function is neither
static nor does it expect only one int parameter...
Am I doing something wrong? I am calling "print_generic_decl(file,
decl, 0);" from the PLUGIN_PRE_GENERICIZE hook and this is gcc version
4.5.1 (GCC) on Solaris.