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 #21 from joe at mcknight dot de 2011-03-15 16:18:37 UTC ---
(In reply to comment #19)
> All looks good to me with your C testcase:
> 
> (gdb) call debug_generic_expr (fndecl->common.type)
> int <T357> (struct 
> {
>   double dvar;
>   int ivar;
> } *)

Hm, the function was declared to take a new type "tpdefp", so I was expecting
the dump to return it like this and not resolve it to whatever it is typedef'ed
to.

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.


> (gdb) call debug_generic_expr (fndecl->common.type)
> void (*Handler) (int, void *) <T352> (void)

It outputs "static void (*Handler) (int, void *) GetFunctionPointer (void);"

And this is not C  :-)

The compiler throws a parse error when I compile a function with the prototype
that it outputs.


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