From owner-svn-src-head@freebsd.org Sun Oct 11 19:58:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C32DA11FA8; Sun, 11 Oct 2015 19:58:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 662E41645; Sun, 11 Oct 2015 19:58:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BJwvPl069444; Sun, 11 Oct 2015 19:58:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BJwvuI069443; Sun, 11 Oct 2015 19:58:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201510111958.t9BJwvuI069443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 11 Oct 2015 19:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289150 - head/contrib/gcc/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 19:58:58 -0000 Author: pfg Date: Sun Oct 11 19:58:57 2015 New Revision: 289150 URL: https://svnweb.freebsd.org/changeset/base/289150 Log: 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 Modified: head/contrib/gcc/cp/parser.c Modified: head/contrib/gcc/cp/parser.c ============================================================================== --- head/contrib/gcc/cp/parser.c Sun Oct 11 19:30:09 2015 (r289149) +++ head/contrib/gcc/cp/parser.c Sun Oct 11 19:58:57 2015 (r289150) @@ -10906,6 +10906,7 @@ cp_parser_enum_specifier (cp_parser* par 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);