diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-04-15 10:25:22 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-04-15 10:27:08 +0200 |
commit | 7ec54f5fdfec298812a749699874db4d6a7246bb (patch) | |
tree | ac79fd5b6f0e4ff80c60a8298de28999e79510f6 /gcc/rust | |
parent | 3878e9aeb30cb192f769997c52743daf8190744c (diff) | |
download | gcc-7ec54f5fdfec298812a749699874db4d6a7246bb.zip gcc-7ec54f5fdfec298812a749699874db4d6a7246bb.tar.gz gcc-7ec54f5fdfec298812a749699874db4d6a7246bb.tar.bz2 |
attribs: Don't crash on NULL TREE_TYPE in diag_attr_exclusions [PR114634]
The enumerator still doesn't have TREE_TYPE set but diag_attr_exclusions
assumes that all decls must have types.
I think it is better in something as unimportant as diag_attr_exclusions
to be more robust, if there is no type, it can just diagnose exclusions
on the DECL_ATTRIBUTES, like for types it only diagnoses it on
TYPE_ATTRIBUTES.
2024-04-15 Jakub Jelinek <jakub@redhat.com>
PR c++/114634
* attribs.cc (diag_attr_exclusions): Set attrs[1] to NULL_TREE for
decls with NULL TREE_TYPE.
* g++.dg/ext/attrib68.C: New test.
Diffstat (limited to 'gcc/rust')
0 files changed, 0 insertions, 0 deletions