This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/3] C++ bits to improve detection of attribute conflicts (PR 81544)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 08 Dec 2017 10:43:58 +0100
- Subject: Re: [PATCH 5/3] C++ bits to improve detection of attribute conflicts (PR 81544)
- Authentication-results: sourceware.org; auth=none
- References: <4899e27e-6fc3-a887-7888-9f7810a07aaa@gmail.com> <d5463f60-b96a-083a-4560-76deda2be90b@gmail.com> <31b7c6fd-3409-5029-5dea-d91310536cbb@redhat.com> <c7fc1256-de3f-395f-6a31-096013ed57f4@gmail.com> <4b022406-f61e-5e1b-7df8-65b455e43094@gmail.com>
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. */