This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/3] C++ bits to improve detection of attribute conflicts (PR 81544)


Hi Martin,

> Ping: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01034.html
>
> The attached C++ only patch is rebased on the top of trunk.
>
> The remaining patches in the series (C FE and the back ends)
> have been approved.

your patch broke Solaris bootstrap:

/vol/gcc/src/hg/trunk/local/gcc/config/sparc/sparc.c:699:1: error: missing initializer for member 'attribute_spec::exclude' [-Werror=missing-field-initializers]
 };
 ^
/vol/gcc/src/hg/trunk/local/gcc/config/sparc/sparc.c:699:1: error: missing initializer for member 'attribute_spec::exclude' [-Werror=missing-field-initializers]

/vol/gcc/src/hg/trunk/local/gcc/config/i386/i386.c:44761:1: error: missing initializer for member 'attribute_spec::exclude' [-Werror=missing-field-initializers]
 };
 ^
/vol/gcc/src/hg/trunk/local/gcc/config/i386/i386.c:44761:1: error: missing initializer for member 'attribute_spec::exclude' [-Werror=missing-field-initializers]


The line numbers are completely misleading, unfortunately.  Hadn't
SUBTARGET_ATTRIBUTE_TABLE been used at the end of the (very short)
sparc_attribute_table, I wouldn't have seen what was wrong.

The following patch fixes the problem, installed on mainline after
i386-pc-solaris2.11 and sparc-sun-solaris2.11 bootstraps completed
without regressions.

However, there are two more SUBTARGET_ATTRIBUTE_TABLE defines:

gcc/config/darwin.h:#define SUBTARGET_ATTRIBUTE_TABLE                               \
gcc/config/i386/cygming.h:#define SUBTARGET_ATTRIBUTE_TABLE \

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2017-12-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Initialize new member
	of struct attribute_spec.

# HG changeset patch
# Parent  437a73acf1a5ffdc19298cad526f5f85d5496ed0
Initialize new member of SOLARIS_ATTRIBUTE_TABLE

diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -409,8 +409,8 @@ along with GCC; see the file COPYING3.  
 /* #pragma init and #pragma fini are implemented on top of init and
    fini attributes.  */
 #define SOLARIS_ATTRIBUTE_TABLE						\
-  { "init",      0, 0, true,  false,  false, NULL, false },		\
-  { "fini",      0, 0, true,  false,  false, NULL, false }
+  { "init",      0, 0, true,  false,  false, NULL, false, NULL },	\
+  { "fini",      0, 0, true,  false,  false, NULL, false, NULL }
 
 /* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
    the bits from config/sol2.c.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]