[Bug middle-end/47650] wrong output of print_generic_decl() called from a plugin
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Wed Mar 16 09:40:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47650
--- Comment #24 from rguenther at suse dot de <rguenther at suse dot de> 2011-03-16 09:38:37 UTC ---
On Tue, 15 Mar 2011, joe at mcknight dot de wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47650
>
> --- Comment #23 from joe at mcknight dot de 2011-03-15 17:05:24 UTC ---
> (In reply to comment #22)
> > > Compare it to:
> > >
> > > typedef int mytype;
> > > int myfunc2(mytype var) {
> > > return 1;
> > > };
> > >
> > > which outputs
> > >
> > > static int myfunc2 (mytype);
> > >
> > > i.e. returns the newly created type as well.
> >
> > That's by design.
>
> Then what is the design rule behind it, for me it looks inconsistent to once
> inline the original type and another time use the newly created type.
>
>
> > > It outputs "static void (*Handler) (int, void *) GetFunctionPointer (void);"
> >
> > It's not designed to do that. The functions are for debugging and
> > diagnostic output only, they are not supposed to generate valid C.
>
> I know, but instead of creating a new language, wouldn't it be good to just
> stick to the C grammar to describe what is being seen?
>
>
>
> Was the debug output helpful with respect to the wrong variadic output?
Well, it confirmed that void_list_node is not used, but I can't
reproduce this fact.
More information about the Gcc-bugs
mailing list