This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47650] 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, 15 Mar 2011 17:05:38 +0000
- Subject: [Bug middle-end/47650] wrong output of print_generic_decl() called from a plugin
- Auto-submitted: auto-generated
- References: <bug-47650-4@http.gcc.gnu.org/bugzilla/>
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?
thanks!