On 10/24/14 08:16, Marek Polacek wrote:
Our current C pretty printer output sometimes looks a bit goofy:
"expected ‘enum F *’ but argument is of type ‘enum F *’".
It's because it always prints "struct"/"union"/"enum" even though
the type is a typedef name. This patch ought to fix this.
We've got a bunch of reports about this over the years...
The C++ printer can also print "B* {aka A*}", I'll try to learn
c_tree_printer to do something similar as well.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-10-24 Marek Polacek <pola...@redhat.com>
PR c/56980
* c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
print "struct"/"union"/"enum" for typedefed names.
* gcc.dg/pr56980.c: New test.
OK.
Jeff