[Bug c/56980] C pretty-printer does not handle well pointer to typedef of struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56980 --- Comment #9 from Marek Polacek mpolacek at gcc dot gnu.org --- Author: mpolacek Date: Fri Oct 24 16:29:56 2014 New Revision: 216674 URL: https://gcc.gnu.org/viewcvs?rev=216674root=gccview=rev Log: 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. Added: trunk/gcc/testsuite/gcc.dg/pr56980.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-pretty-print.c trunk/gcc/testsuite/ChangeLog
[Bug c/56980] C pretty-printer does not handle well pointer to typedef of struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56980 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Marek Polacek mpolacek at gcc dot gnu.org --- Should be fixed.
[Bug c/56980] C pretty-printer does not handle well pointer to typedef of struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56980 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #7 from Marek Polacek mpolacek at gcc dot gnu.org --- This patch seems to fix it, but I haven't tested it. --- gcc/c-family/c-pretty-print.c +++ gcc/c-family/c-pretty-print.c @@ -416,7 +416,9 @@ c_pretty_printer::simple_type_specifier (tree t) case UNION_TYPE: case RECORD_TYPE: case ENUMERAL_TYPE: - if (code == UNION_TYPE) + if (TYPE_NAME (t) TREE_CODE (TYPE_NAME (t)) == TYPE_DECL) +; + else if (code == UNION_TYPE) pp_c_ws_string (this, union); else if (code == RECORD_TYPE) pp_c_ws_string (this, struct);
[Bug c/56980] C pretty-printer does not handle well pointer to typedef of struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56980 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added CC||tromey at gcc dot gnu.org --- Comment #8 from Marek Polacek mpolacek at gcc dot gnu.org --- *** Bug 61416 has been marked as a duplicate of this bug. ***
[Bug c/56980] C pretty-printer does not handle well pointer to typedef of struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56980 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added CC||gccbugs at dima dot secretsauce.ne ||t --- Comment #6 from Manuel López-Ibáñez manu at gcc dot gnu.org --- *** Bug 63421 has been marked as a duplicate of this bug. ***