aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-10-01 08:56:25 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-10-01 08:56:25 +0000
commit558798156b41fcbe5ba68b75171708cad135b041 (patch)
tree7e71706fa542a6dc326eaee82cfdf1611bdeaf7d /gcc/tree-vect-loop.c
parent8209db250f305cc79fd751c3ed056fb9ff551a83 (diff)
downloadgcc-558798156b41fcbe5ba68b75171708cad135b041.zip
gcc-558798156b41fcbe5ba68b75171708cad135b041.tar.gz
gcc-558798156b41fcbe5ba68b75171708cad135b041.tar.bz2
[C] Avoid aka types that just add tags
diag-aka-1.c tests that: struct T { int i; } T; void *a; T *t = a; produces: request for implicit conversion from 'void *' to 'T *' {aka 'struct T *'} ... But printing an aka for the tag seems a bit redundant when the tag name is the same as the typedef name. It's probably not going to be telling the user anything they don't already know, and can be distracting if "T" rather than "struct T" is the preferred choice for an exported interface. This is even more true if the tag is anonymous; e.g.: struct { int i; } T; void *a; T *t = a; gives: request for implicit conversion from 'void *' to 'T *' {aka 'struct <anonymous> *'} Rather than just drop the test above, the patch instead tests for: struct T { int i; } *T; where seeing the tag definitely helps. 2019-10-01 Richard Sandiford <richard.sandiford@arm.com> gcc/c/ * c-objc-common.c (useful_aka_type_p): New function. (print_type): Use it to decide whether an aka type is worth printing. gcc/testsuite/ * gcc.dg/diag-aka-1.c (T): Turn into a pointer typedef. (foo): Update accordingly. * gcc.dg/diag-aka-4.c: New test. From-SVN: r276395
Diffstat (limited to 'gcc/tree-vect-loop.c')
0 files changed, 0 insertions, 0 deletions