re PR rtl-optimization/57105 (ICE: in add_insn_before_nobb, at emit-rtl.c:3883 with...
authorBruce Korb <bkorb@gnu.org>
Wed, 11 Jan 2012 16:23:48 +0000 (16:23 +0000)
committerAndreas Tobler <andreast@gcc.gnu.org>
Wed, 11 Jan 2012 16:23:48 +0000 (17:23 +0100)
2012-01-11  Bruce Korb <bkorb@gnu.org>
    Steven G. Kargl  <kargl@gcc.gnu.org>
    Andreas Tobler  <andreast@fgznet.ch>

PR bootstrap/57105
PR preprocessor/51776
* inclhack.def (cdef_cplusplus): Add a replacement for [[noreturn]].
* fixincl.x: Regenerate.
* tests/base/sys/cdefs.h: Update.

* genfixes: Remove the 'Ver.' from the version check.

Co-Authored-By: Andreas Tobler <andreast@fgznet.ch>
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r183096

fixincludes/ChangeLog
fixincludes/fixincl.x
fixincludes/genfixes
fixincludes/inclhack.def
fixincludes/tests/base/sys/cdefs.h

index 64fcc459b17872d13120cad6e1994f564569b06c..3e058ec3d0f663d2310d38683997125d00fd33e8 100644 (file)
@@ -1,3 +1,15 @@
+2012-01-11  Bruce Korb <bkorb@gnu.org>
+           Steven G. Kargl  <kargl@gcc.gnu.org>
+           Andreas Tobler  <andreast@fgznet.ch>
+
+       PR bootstrap/57105
+       PR preprocessor/51776
+       * inclhack.def (cdef_cplusplus): Add a replacement for [[noreturn]].
+       * fixincl.x: Regenerate.
+       * tests/base/sys/cdefs.h: Update.
+
+       * genfixes: Remove the 'Ver.' from the version check.
+
 2011-12-20  Andreas Schwab  <schwab@linux-m68k.org>
 
        * configure: Regenerate.
index dac0a4ed229e04c4da165c25ddb05752fae37b7c..517fba9df061f56962050dea4d9e61a1c254d97f 100644 (file)
@@ -2,11 +2,11 @@
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
- * It has been AutoGen-ed  November  7, 2011 at 01:16:39 PM by AutoGen 5.10
+ * It has been AutoGen-ed  January  9, 2012 at 11:55:38 PM by AutoGen 5.12
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Nov  7 13:16:39 EST 2011
+/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Jan  9 23:55:38 CET 2012
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -15,7 +15,7 @@
  * certain ANSI-incompatible system header files which are fixed to work
  * correctly with ANSI C and placed in a directory that GNU C will search.
  *
- * This file contains 222 fixup descriptions.
+ * This file contains 223 fixup descriptions.
  *
  * See README for more information.
  *
@@ -1878,6 +1878,41 @@ static const char* apzBsd_Stdio_Attrs_ConflictPatch[] = {
 int vfscanf(FILE *, const char *, __builtin_va_list) __asm__ (_BSD_STRING(__USER_LABEL_PREFIX__) \"__svfscanf\");",
     (char*)NULL };
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Cdef_Cplusplus fix
+ */
+tSCC zCdef_CplusplusName[] =
+     "cdef_cplusplus";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zCdef_CplusplusList[] =
+  "sys/cdefs.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+#define apzCdef_CplusplusMachs (const char**)NULL
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zCdef_CplusplusSelect0[] =
+       "\\[\\[noreturn\\]\\]";
+
+#define    CDEF_CPLUSPLUS_TEST_CT  1
+static tTestDesc aCdef_CplusplusTests[] = {
+  { TT_EGREP,    zCdef_CplusplusSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Cdef_Cplusplus
+ */
+static const char* apzCdef_CplusplusPatch[] = {
+    "format",
+    "__attribute__((__noreturn__))",
+    (char*)NULL };
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Ctrl_Quotes_Def fix
@@ -9034,9 +9069,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          264
+#define REGEX_COUNT          265
 #define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT            222
+#define FIX_COUNT            223
 
 /*
  *  Enumerate the fixes
@@ -9086,6 +9121,7 @@ typedef enum {
     BROKEN_CABS_FIXIDX,
     BROKEN_NAN_FIXIDX,
     BSD_STDIO_ATTRS_CONFLICT_FIXIDX,
+    CDEF_CPLUSPLUS_FIXIDX,
     CTRL_QUOTES_DEF_FIXIDX,
     CTRL_QUOTES_USE_FIXIDX,
     CXX_UNREADY_FIXIDX,
@@ -9487,6 +9523,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      BSD_STDIO_ATTRS_CONFLICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aBsd_Stdio_Attrs_ConflictTests,   apzBsd_Stdio_Attrs_ConflictPatch, 0 },
 
+  {  zCdef_CplusplusName,    zCdef_CplusplusList,
+     apzCdef_CplusplusMachs,
+     CDEF_CPLUSPLUS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aCdef_CplusplusTests,   apzCdef_CplusplusPatch, 0 },
+
   {  zCtrl_Quotes_DefName,    zCtrl_Quotes_DefList,
      apzCtrl_Quotes_DefMachs,
      CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index 6bc60d2279c42476a92aa8baa96dc72ed8e48fd2..f186a5082469ab541fbd0cc13362364bcbe81fd8 100755 (executable)
@@ -62,7 +62,7 @@ fi
 AG="autogen $AG"
 set -e
 
-if [ -z "`${AG} -v | fgrep 'Ver. 5.'`" ]
+if [ -z "`${AG} -v | fgrep ' 5.'`" ]
 then
   echo "AutoGen appears to be out of date or not correctly installed."
   echo "Please download and install:"
index 0567bf474e08932e9252eaf5ec2f495efec182e6..b441dc15f540cea7fd99e81f0855d4e49cd70032 100644 (file)
@@ -1028,6 +1028,22 @@ fix = {
     test_text = '#define  vfscanf      __svfscanf';
 };
 
+/*
+ * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests
+ * that it conforms to ISO/IEC 14882:2011.  Until G++ fully conforms,
+ * it should not set __cplusplus to that value.  It currently does
+ * not support the [[noreturn]] procedure attribute.
+ * When it does, this hack should be removed.
+ * SEE:  gcc.gnu.org/bugzilla/show_bug.cgi?id=51776
+ */
+fix = {
+    hackname  = cdef_cplusplus;
+    files     = sys/cdefs.h;
+    select    = '\[\[noreturn\]\]';
+    c_fix     = format;
+    c_fix_arg = '__attribute__((__noreturn__))';
+    test_text = "#define _Noreturn     [[noreturn]]";
+};
 
 /*
  *  Fix various macros used to define ioctl numbers.
index 6ccd0b7738a39d04365e981f16934c41901c2912..e42df6f527b5afa0a6d08598f09f50528a7f69b1 100644 (file)
@@ -9,6 +9,11 @@
 
 
 
+#if defined( CDEF_CPLUSPLUS_CHECK )
+#define _Noreturn      __attribute__((__noreturn__))
+#endif  /* CDEF_CPLUSPLUS_CHECK */
+
+
 #if defined( FREEBSD_GCC3_BREAKAGE_CHECK )
 #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7
 #endif  /* FREEBSD_GCC3_BREAKAGE_CHECK */