This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug middle-end/47650] wrong output of print_generic_decl() called from a plugin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47650

--- Comment #29 from joe at mcknight dot de 2011-04-06 17:55:30 UTC ---
FWIW, I can reproduce this now on Solaris without any magic compiler switches:

The program is just this here:

-------------------
void
foo(char *buf, int bufsz);

void
foo(char * const buf, const int bufsz)
{
}
-------------------

Compiling with just

gcc -fplugin=/path/to/plugin/testplugin.so -c foo.c
(gcc 4.5.2 with your patch on sparc-sun-solaris2.10)

gives me:

  static void foo (char * const, int, void, ...);


However it only shows up on Solaris, I tried it on a Linux installation I have
as well and I get the correct output there :-(

Note the differences between the declaration and the definition regarding
"const". If I remove any const in the definition (for buf or bufsz) or add a
const to the declaration, the output will be correct.


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