summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-10-11 19:58:57 +0000
committerpfg <pfg@FreeBSD.org>2015-10-11 19:58:57 +0000
commit6976026b48b8551e5dd6e09e504941ca5bb9b008 (patch)
tree064cfd165dc6b4b46ee0acea04367462b1979cec /contrib/gcc
parentc1601c9acc19ea0aabc49cb6cfdc3cd84e5c05e9 (diff)
downloadFreeBSD-src-6976026b48b8551e5dd6e09e504941ca5bb9b008.zip
FreeBSD-src-6976026b48b8551e5dd6e09e504941ca5bb9b008.tar.gz
Correct handling of enum attributes with g++
From OpenBSD's commit log: This was responsible for memory corruption with recent versions of Mesa where c and c++ code share a header with a packed enum type. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 Obtained from: OpenBSD (CVS rev. 1.2) MFC after: 1 week
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/cp/parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/gcc/cp/parser.c b/contrib/gcc/cp/parser.c
index 25cc225..895d0ee 100644
--- a/contrib/gcc/cp/parser.c
+++ b/contrib/gcc/cp/parser.c
@@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* parser)
if (cp_parser_allow_gnu_extensions_p (parser))
{
tree trailing_attr = cp_parser_attributes_opt (parser);
+ trailing_attr = chainon (trailing_attr, attributes);
cplus_decl_attributes (&type,
trailing_attr,
(int) ATTR_FLAG_TYPE_IN_PLACE);
OpenPOWER on IntegriCloud