public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH][Revisedx2] Fix PR63750
@ 2014-11-10 14:58 FX
  2014-11-10 15:02 ` FX
  0 siblings, 1 reply; 12+ messages in thread
From: FX @ 2014-11-10 14:58 UTC (permalink / raw)
  To: GCC Patches
  Cc: Richard Biener, howarthjw, ilya.enkovich, Iain Sandoe, Mike Stump

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

> Indeed <string> is a system header and should not have been included from tree-chkp.c but system.h

Indeed.
My knowledge of C++ is limited, but I think this additional patch to wide-int.h is the proper fix to the issue reported by Jack, no?
I’m bootstrapping it right now, it already passed stage 2.

Richard, I’d appreciate if you could review it.

Cheers,
FX



[-- Attachment #2: string.diff --]
[-- Type: application/octet-stream, Size: 2505 bytes --]

Index: gcc/system.h
===================================================================
--- gcc/system.h	(revision 217269)
+++ gcc/system.h	(working copy)
@@ -194,6 +194,13 @@ extern int fprintf_unlocked (FILE *, con
 #undef fread_unlocked
 #undef fwrite_unlocked
 
+/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+   the ctype macros through safe-ctype.h */
+
+#ifdef __cplusplus
+# include <string>
+#endif
+
 /* There are an extraordinary number of issues with <ctype.h>.
    The last straw is that it varies with the locale.  Use libiberty's
    replacement instead.  */
Index: gcc/wide-int.h
===================================================================
--- gcc/wide-int.h	(revision 217269)
+++ gcc/wide-int.h	(working copy)
@@ -2129,7 +2129,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::smin (const T1 &x, const T2 &y)
 {
-  return min (x, y, SIGNED);
+  return wi::min (x, y, SIGNED);
 }
 
 /* Return the minimum of X and Y, treating both as unsigned values.  */
@@ -2137,7 +2137,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::umin (const T1 &x, const T2 &y)
 {
-  return min (x, y, UNSIGNED);
+  return wi::min (x, y, UNSIGNED);
 }
 
 /* Return the maxinum of X and Y, treating them both as having
@@ -2160,7 +2160,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::smax (const T1 &x, const T2 &y)
 {
-  return max (x, y, SIGNED);
+  return wi::max (x, y, SIGNED);
 }
 
 /* Return the maximum of X and Y, treating both as unsigned values.  */
@@ -2168,7 +2168,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::umax (const T1 &x, const T2 &y)
 {
-  return max (x, y, UNSIGNED);
+  return wi::max (x, y, UNSIGNED);
 }
 
 /* Return X & Y.  */
Index: gcc/ipa-chkp.c
===================================================================
--- gcc/ipa-chkp.c	(revision 217269)
+++ gcc/ipa-chkp.c	(working copy)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  
 #include "cgraph.h"
 #include "tree-chkp.h"
 #include "ipa-chkp.h"
-#include <string>
 
 /*  Pointer Bounds Checker has two IPA passes to support code instrumentation.
 
Index: libcc1/plugin.cc
===================================================================
--- libcc1/plugin.cc	(revision 217269)
+++ libcc1/plugin.cc	(working copy)
@@ -55,8 +55,6 @@
 #include "connection.hh"
 #include "rpc.hh"
 
-#include <string>
-
 #ifdef __GNUC__
 #pragma GCC visibility push(default)
 #endif

[-- Attachment #3: string.ChangeLog --]
[-- Type: application/octet-stream, Size: 436 bytes --]

2014-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR bootstrap/63699
	PR bootstrap/63750
	* system.h: Include <string> before "safe-ctype.h"
	* wide-int.h (wi::smin, wi::smax, wi::umin, wi::umax): Prefix
	calls to min/max with wi namespace.
	* ipa-chkp.c: Don't include <string>.


2014-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR bootstrap/63699
	PR bootstrap/63750
	* plugin.cc: Don't include <string>.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-10 14:58 [PATCH][Revisedx2] Fix PR63750 FX
@ 2014-11-10 15:02 ` FX
  2014-11-10 17:25   ` Jack Howarth
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: FX @ 2014-11-10 15:02 UTC (permalink / raw)
  To: GCC Patches
  Cc: Richard Biener, howarthjw, ilya.enkovich, Iain Sandoe, Mike Stump

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

> My knowledge of C++ is limited, but I think this additional patch to wide-int.h is the proper fix to the issue reported by Jack, no?
> I’m bootstrapping it right now, it already passed stage 2.

Boostrapped succeeded on x86_64-apple-darwin14.
OK to commit to trunk?


[-- Attachment #2: string.diff --]
[-- Type: application/octet-stream, Size: 2505 bytes --]

Index: gcc/system.h
===================================================================
--- gcc/system.h	(revision 217269)
+++ gcc/system.h	(working copy)
@@ -194,6 +194,13 @@ extern int fprintf_unlocked (FILE *, con
 #undef fread_unlocked
 #undef fwrite_unlocked
 
+/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+   the ctype macros through safe-ctype.h */
+
+#ifdef __cplusplus
+# include <string>
+#endif
+
 /* There are an extraordinary number of issues with <ctype.h>.
    The last straw is that it varies with the locale.  Use libiberty's
    replacement instead.  */
Index: gcc/wide-int.h
===================================================================
--- gcc/wide-int.h	(revision 217269)
+++ gcc/wide-int.h	(working copy)
@@ -2129,7 +2129,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::smin (const T1 &x, const T2 &y)
 {
-  return min (x, y, SIGNED);
+  return wi::min (x, y, SIGNED);
 }
 
 /* Return the minimum of X and Y, treating both as unsigned values.  */
@@ -2137,7 +2137,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::umin (const T1 &x, const T2 &y)
 {
-  return min (x, y, UNSIGNED);
+  return wi::min (x, y, UNSIGNED);
 }
 
 /* Return the maxinum of X and Y, treating them both as having
@@ -2160,7 +2160,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::smax (const T1 &x, const T2 &y)
 {
-  return max (x, y, SIGNED);
+  return wi::max (x, y, SIGNED);
 }
 
 /* Return the maximum of X and Y, treating both as unsigned values.  */
@@ -2168,7 +2168,7 @@ template <typename T1, typename T2>
 inline WI_BINARY_RESULT (T1, T2)
 wi::umax (const T1 &x, const T2 &y)
 {
-  return max (x, y, UNSIGNED);
+  return wi::max (x, y, UNSIGNED);
 }
 
 /* Return X & Y.  */
Index: gcc/ipa-chkp.c
===================================================================
--- gcc/ipa-chkp.c	(revision 217269)
+++ gcc/ipa-chkp.c	(working copy)
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  
 #include "cgraph.h"
 #include "tree-chkp.h"
 #include "ipa-chkp.h"
-#include <string>
 
 /*  Pointer Bounds Checker has two IPA passes to support code instrumentation.
 
Index: libcc1/plugin.cc
===================================================================
--- libcc1/plugin.cc	(revision 217269)
+++ libcc1/plugin.cc	(working copy)
@@ -55,8 +55,6 @@
 #include "connection.hh"
 #include "rpc.hh"
 
-#include <string>
-
 #ifdef __GNUC__
 #pragma GCC visibility push(default)
 #endif

[-- Attachment #3: string.ChangeLog --]
[-- Type: application/octet-stream, Size: 436 bytes --]

2014-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR bootstrap/63699
	PR bootstrap/63750
	* system.h: Include <string> before "safe-ctype.h"
	* wide-int.h (wi::smin, wi::smax, wi::umin, wi::umax): Prefix
	calls to min/max with wi namespace.
	* ipa-chkp.c: Don't include <string>.


2014-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR bootstrap/63699
	PR bootstrap/63750
	* plugin.cc: Don't include <string>.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-10 15:02 ` FX
@ 2014-11-10 17:25   ` Jack Howarth
  2014-11-10 18:15   ` Mike Stump
  2014-11-11  9:15   ` Richard Biener
  2 siblings, 0 replies; 12+ messages in thread
From: Jack Howarth @ 2014-11-10 17:25 UTC (permalink / raw)
  To: FX
  Cc: GCC Patches, Richard Biener, howarthjw, ilya.enkovich,
	Iain Sandoe, Mike Stump

Also confirmed that FX's proposed string.diff patch solves both
PR63699 and PR63750 on x86_64-apple-darwin13 against Xcode 6.1.

On Mon, Nov 10, 2014 at 9:58 AM, FX <fxcoudert@gmail.com> wrote:
>> My knowledge of C++ is limited, but I think this additional patch to wide-int.h is the proper fix to the issue reported by Jack, no?
>> I’m bootstrapping it right now, it already passed stage 2.
>
> Boostrapped succeeded on x86_64-apple-darwin14.
> OK to commit to trunk?
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-10 15:02 ` FX
  2014-11-10 17:25   ` Jack Howarth
@ 2014-11-10 18:15   ` Mike Stump
  2014-11-10 19:03     ` Mike Stump
  2014-11-11  9:15   ` Richard Biener
  2 siblings, 1 reply; 12+ messages in thread
From: Mike Stump @ 2014-11-10 18:15 UTC (permalink / raw)
  To: FX; +Cc: GCC Patches, Richard Biener, howarthjw, ilya.enkovich, Iain Sandoe

On Nov 10, 2014, at 6:58 AM, FX <fxcoudert@gmail.com> wrote:
>> My knowledge of C++ is limited, but I think this additional patch to wide-int.h is the proper fix to the issue reported by Jack, no?
>> I’m bootstrapping it right now, it already passed stage 2.
> 
> Boostrapped succeeded on x86_64-apple-darwin14.
> OK to commit to trunk?

I’m ok with this version.

I’’ve asked Jack for the header in question that makes max/min ambiguous.  I think this is a bug in the system libraries, that said, I’m ok with working around the bug in the wide-int source code as expedient.  I think including string in system.h is unfortunate, and I think the whole do_not_use_toupper_with_safe_ctype thing is unfortunate.  Unless someone wants to reengineer ctype… or require the removal of string and all other system headers that are not in system.h…  I think this is as good as we can do for now.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-10 18:15   ` Mike Stump
@ 2014-11-10 19:03     ` Mike Stump
  0 siblings, 0 replies; 12+ messages in thread
From: Mike Stump @ 2014-11-10 19:03 UTC (permalink / raw)
  To: FX; +Cc: GCC Patches, Richard Biener, howarthjw, ilya.enkovich, Iain Sandoe

On Nov 10, 2014, at 10:10 AM, Mike Stump <mikestump@comcast.net> wrote:
> I’’ve asked Jack for the header in question that makes max/min ambiguous.

Ok, found it, page 903 of c++14.  Also in the 97 version.  We need the wi:: qualifications for wide-int with min and max.  That part of the patch is Ok.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-10 15:02 ` FX
  2014-11-10 17:25   ` Jack Howarth
  2014-11-10 18:15   ` Mike Stump
@ 2014-11-11  9:15   ` Richard Biener
  2014-11-11  9:23     ` FX
  2 siblings, 1 reply; 12+ messages in thread
From: Richard Biener @ 2014-11-11  9:15 UTC (permalink / raw)
  To: FX; +Cc: GCC Patches, howarthjw, ilya.enkovich, Iain Sandoe, Mike Stump

On Mon, Nov 10, 2014 at 3:58 PM, FX <fxcoudert@gmail.com> wrote:
>> My knowledge of C++ is limited, but I think this additional patch to wide-int.h is the proper fix to the issue reported by Jack, no?
>> I’m bootstrapping it right now, it already passed stage 2.
>
> Boostrapped succeeded on x86_64-apple-darwin14.
> OK to commit to trunk?

Ok.

Thanks,
Richard.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-11  9:15   ` Richard Biener
@ 2014-11-11  9:23     ` FX
  0 siblings, 0 replies; 12+ messages in thread
From: FX @ 2014-11-11  9:23 UTC (permalink / raw)
  To: Richard Biener
  Cc: GCC Patches, howarthjw, ilya.enkovich, Iain Sandoe, Mike Stump

> Ok.

Committed as rev. 217342.
Thanks for the review!

FX

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-10 12:00     ` Richard Biener
@ 2014-11-10 13:09       ` Ilya Enkovich
  0 siblings, 0 replies; 12+ messages in thread
From: Ilya Enkovich @ 2014-11-10 13:09 UTC (permalink / raw)
  To: Richard Biener
  Cc: Jack Howarth, Enkovich, Ilya, Iain Sandoe, GCC Patches, Mike Stump

2014-11-10 14:53 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
> On Sun, Nov 9, 2014 at 5:57 PM, Jack Howarth <howarth.at.gcc@gmail.com> wrote:
>> Iain,
>>      It doesn't look like it will be that simple. If I replace the
>> proposed patches with a change like...
>>
>> Index: gcc/system.h
>> ===================================================================
>> --- gcc/system.h        (revision 217238)
>> +++ gcc/system.h        (working copy)
>> @@ -194,6 +194,13 @@ extern int fprintf_unlocked (FILE *, con
>>  #undef fread_unlocked
>>  #undef fwrite_unlocked
>>
>> +/* Include <string> before "safe-ctype.h" to avoid avoid GCC poisoning
>> +the ctype macros through safe-ctype.h */
>> +
>> +#ifdef __cplusplus
>> +# include <string>
>> +#endif
>> +
>
> Indeed <string> is a system header and should not have been included
> from tree-chkp.c but system.h.

Since attempt to put it into system.h causes such errors I may just
get rid of string usage in ipa-chkp.c at all.  It's not hardly used.

Ilya

>
> Richard.
>
>>  /* There are an extraordinary number of issues with <ctype.h>.
>>     The last straw is that it varies with the locale.  Use libiberty's
>>     replacement instead.  */
>>
>> The bootstrap fails at a new place with...
>>
>> make[3]: Entering directory
>> '/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc'
>> g++ -c   -g  -DIN_GCC    -fno-exceptions -fno-rtti
>> -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
>> -Wcast-qual -Wno-format -Wmissing-format-attribute
>> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
>> -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
>> -I../../gcc-5.0-20141107/gcc -I../../gcc-5.0-20141107/gcc/.
>> -I../../gcc-5.0-20141107/gcc/../include
>> -I../../gcc-5.0-20141107/gcc/../libcpp/include -I/sw/include
>> -I/sw/include  -I../../gcc-5.0-20141107/gcc/../libdecnumber
>> -I../../gcc-5.0-20141107/gcc/../libdecnumber/dpd -I../libdecnumber
>> -I../../gcc-5.0-20141107/gcc/../libbacktrace -DCLOOG_INT_GMP
>> -I/sw/include -DCLOOG_INT_GMP -I/sw/include -I/sw/include -o
>> simplify-rtx.o -MT simplify-rtx.o -MMD -MP -MF
>> ./.deps/simplify-rtx.TPo ../../gcc-5.0-20141107/gcc/simplify-rtx.c
>> clang: warning: treating 'c' input as 'c++' when in C++ mode, this
>> behavior is deprecated
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:23:
>> ../../gcc-5.0-20141107/gcc/coretypes.h:62:1: warning: class 'rtx_def'
>> was previously declared as a struct [-Wmismatched-tags]
>> class rtx_def;
>> ^
>> ../../gcc-5.0-20141107/gcc/coretypes.h:55:8: note: previous use is here
>> struct rtx_def;
>>        ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:27:
>> In file included from ../../gcc-5.0-20141107/gcc/real.h:25:
>> ../../gcc-5.0-20141107/gcc/wide-int.h:370:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:377:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:384:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:394:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:401:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:411:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:422:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:886:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:965:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/wide-int.h:1127:1: warning:
>> 'fixed_wide_int_storage' defined as a class template here but
>> previously declared as a struct template
>>       [-Wmismatched-tags]
>> class GTY(()) fixed_wide_int_storage
>> ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:286:18: note: did you mean class here?
>> template <int N> struct fixed_wide_int_storage;
>>                  ^~~~~~
>>                  class
>> ../../gcc-5.0-20141107/gcc/wide-int.h:1152:3: warning: extraneous
>> template parameter list in template specialization
>>   template <>
>>   ^~~~~~~~~~~
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:28:
>> In file included from ../../gcc-5.0-20141107/gcc/vec.h:44:
>> ../../gcc-5.0-20141107/gcc/ggc.h:315:15: warning: struct 'rtx_def' was
>> previously declared as a class [-Wmismatched-tags]
>> static inline struct rtx_def *
>>               ^
>> ../../gcc-5.0-20141107/gcc/coretypes.h:62:7: note: previous use is here
>> class rtx_def;
>>       ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:28:
>> In file included from ../../gcc-5.0-20141107/gcc/vec.h:44:
>> ../../gcc-5.0-20141107/gcc/ggc.h:318:11: warning: struct 'rtx_def' was
>> previously declared as a class [-Wmismatched-tags]
>>   return (struct rtx_def *) ggc_internal_alloc (s PASS_MEM_STAT);
>>           ^
>> ../../gcc-5.0-20141107/gcc/coretypes.h:62:7: note: previous use is here
>> class rtx_def;
>>       ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> ../../gcc-5.0-20141107/gcc/rtl.h:283:1: warning: 'rtx_def' defined as
>> a struct here but previously declared as a class [-Wmismatched-tags]
>> struct GTY((desc("0"), tag("0"),
>> ^
>> ../../gcc-5.0-20141107/gcc/coretypes.h:62:1: note: did you mean struct here?
>> class rtx_def;
>> ^~~~~
>> struct
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:3164:
>> ./genrtl.h:435:3: warning: array index 1 is past the end of the array
>> (which contains 1 element) [-Warray-bounds]
>>   XWINT (rt, 1) = arg1;
>>   ^          ~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1121:29: note: expanded from macro 'XWINT'
>> #define XWINT(RTX, N)               ((RTX)->u.hwint[N])
>>                                      ^
>> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>>     HOST_WIDE_INT hwint[1];
>>     ^
>> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
>> 'HOST_WIDE_INT'
>> #   define HOST_WIDE_INT long long
>>                          ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:3164:
>> ./genrtl.h:436:3: warning: array index 2 is past the end of the array
>> (which contains 1 element) [-Warray-bounds]
>>   XWINT (rt, 2) = arg2;
>>   ^          ~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1121:29: note: expanded from macro 'XWINT'
>> #define XWINT(RTX, N)               ((RTX)->u.hwint[N])
>>                                      ^
>> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>>     HOST_WIDE_INT hwint[1];
>>     ^
>> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
>> 'HOST_WIDE_INT'
>> #   define HOST_WIDE_INT long long
>>                          ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:911:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (asm_out)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:1519:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (sched)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:1549:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (simd_clone)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:1767:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (vectorize)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:3023:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (addr_space)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:4522:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (calls)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:5050:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (c)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:5203:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (cxx)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:5292:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (emutls)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:5398:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (target_option)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:5686:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (mode_switching)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
>> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
>> ../../gcc-5.0-20141107/gcc/target.def:5689:1: warning: empty macro
>> arguments are a C99 feature [-Wc99-extensions]
>> HOOK_VECTOR_END (C90_EMPTY_HACK)
>> ^
>> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
>> from macro 'HOOK_VECTOR_END'
>> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>>                                                  ^
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:118:13: warning: array index
>> 1 is past the end of the array (which contains 1 element)
>> [-Warray-bounds]
>>       val = CONST_DOUBLE_HIGH (x);
>>             ^~~~~~~~~~~~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
>> 'CONST_DOUBLE_HIGH'
>> #define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
>>                              ^           ~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
>> #define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
>>                                      ^
>> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>>     HOST_WIDE_INT hwint[1];
>>     ^
>> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
>> 'HOST_WIDE_INT'
>> #   define HOST_WIDE_INT long long
>>                          ^
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:5368:9: warning: array index
>> 1 is past the end of the array (which contains 1 element)
>> [-Warray-bounds]
>>                     = CONST_DOUBLE_HIGH (el) >> (i - HOST_BITS_PER_WIDE_INT);
>>                       ^~~~~~~~~~~~~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
>> 'CONST_DOUBLE_HIGH'
>> #define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
>>                              ^           ~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
>> #define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
>>                                      ^
>> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>>     HOST_WIDE_INT hwint[1];
>>     ^
>> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
>> 'HOST_WIDE_INT'
>> #   define HOST_WIDE_INT long long
>>                          ^
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:5372:12: warning: array
>> index 1 is past the end of the array (which contains 1 element)
>> [-Warray-bounds]
>>               if (CONST_DOUBLE_HIGH (el) >> (HOST_BITS_PER_WIDE_INT - 1))
>>                   ^~~~~~~~~~~~~~~~~~~~~~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
>> 'CONST_DOUBLE_HIGH'
>> #define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
>>                              ^           ~
>> ../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
>> #define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
>>                                      ^
>> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>>     HOST_WIDE_INT hwint[1];
>>     ^
>> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
>> 'HOST_WIDE_INT'
>> #   define HOST_WIDE_INT long long
>>                          ^
>> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
>> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:27:
>> In file included from ../../gcc-5.0-20141107/gcc/real.h:25:
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2132:10: error: call to 'min' is ambiguous
>>   return min (x, y, SIGNED);
>>          ^~~
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3898:17: note: in
>> instantiation of function template specialization
>> 'wi::smin<std::__1::pair<rtx_def *,
>>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>>           result = wi::smin (pop0, pop1);
>>                        ^
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2536:1:
>> note: candidate function [with _Tp
>>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
>> min(const _Tp& __a, const _Tp& __b, _Compare __comp)
>> ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2116:5: note: candidate function
>> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
>> std::__1::pair<rtx_def *,
>>       machine_mode>]
>> wi::min (const T1 &x, const T2 &y, signop sgn)
>>     ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2163:10: error: call to 'max' is ambiguous
>>   return max (x, y, SIGNED);
>>          ^~~
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3902:17: note: in
>> instantiation of function template specialization
>> 'wi::smax<std::__1::pair<rtx_def *,
>>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>>           result = wi::smax (pop0, pop1);
>>                        ^
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2600:1:
>> note: candidate function [with _Tp
>>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
>> max(const _Tp& __a, const _Tp& __b, _Compare __comp)
>> ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2147:5: note: candidate function
>> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
>> std::__1::pair<rtx_def *,
>>       machine_mode>]
>> wi::max (const T1 &x, const T2 &y, signop sgn)
>>     ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2140:10: error: call to 'min' is ambiguous
>>   return min (x, y, UNSIGNED);
>>          ^~~
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3906:17: note: in
>> instantiation of function template specialization
>> 'wi::umin<std::__1::pair<rtx_def *,
>>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>>           result = wi::umin (pop0, pop1);
>>                        ^
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2536:1:
>> note: candidate function [with _Tp
>>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
>> min(const _Tp& __a, const _Tp& __b, _Compare __comp)
>> ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2116:5: note: candidate function
>> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
>> std::__1::pair<rtx_def *,
>>       machine_mode>]
>> wi::min (const T1 &x, const T2 &y, signop sgn)
>>     ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2171:10: error: call to 'max' is ambiguous
>>   return max (x, y, UNSIGNED);
>>          ^~~
>> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3910:17: note: in
>> instantiation of function template specialization
>> 'wi::umax<std::__1::pair<rtx_def *,
>>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>>           result = wi::umax (pop0, pop1);
>>                        ^
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2600:1:
>> note: candidate function [with _Tp
>>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
>> max(const _Tp& __a, const _Tp& __b, _Compare __comp)
>> ^
>> ../../gcc-5.0-20141107/gcc/wide-int.h:2147:5: note: candidate function
>> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
>> std::__1::pair<rtx_def *,
>>       machine_mode>]
>> wi::max (const T1 &x, const T2 &y, signop sgn)
>>     ^
>> 32 warnings and 4 errors generated.
>>
>> I think we are better off for the moment going with the conservative
>> fix (as only two files in all of gcc need it).
>>                Jack
>>
>> On Sun, Nov 9, 2014 at 9:53 AM, Iain Sandoe <iain@codesourcery.com> wrote:
>>> Hi Jack,
>>>
>>> comments below apply also to the patch for PR63699
>>>
>>> On 7 Nov 2014, at 17:13, Jack Howarth wrote:
>>>
>>>>  The attached revised patch eliminates the compilation error...
>>>>
>>>> error: use of undeclared
>>>>      identifier 'do_not_use_toupper_with_safe_ctype'
>>>>
>>>> on x86_64-apple-darwin14 when bootstrapping using the Clang 6.0
>>>> compiler by moving the include for <strings> earlier.
>>>>          Okay for gcc trunk?
>>>>                  Jack
>>>> <PR63750_v3.patch>
>>>
>>> Since you have two instances of this (and given that the other required headers are included in system.h)
>>> ISTM, that the right place for this (and the fix for PR63699) is in system.h with appropriate guards for cplusplus and an explanation of why the fix is needed.
>>>
>>> Need to make sure we're not just burying some other problem, right?
>>> 0.02GBP as always
>>> Iain
>>>
>>> 2014-10-07  Jack Howarth <howarth.at.gcc@gmail.com>
>>>
>>>         PR other/63750
>>>         * gcc/ipa-chkp.c: Include string earlier.
>>>
>>> In any event, if the existing patch is preferred by the maintainers,  please make this ^ something like
>>> "Include <string> before system.h"
>>> to give to poor reader some idea of what the change was about ;)
>>>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-09 16:57   ` Jack Howarth
@ 2014-11-10 12:00     ` Richard Biener
  2014-11-10 13:09       ` Ilya Enkovich
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Biener @ 2014-11-10 12:00 UTC (permalink / raw)
  To: Jack Howarth, ilya.enkovich; +Cc: Iain Sandoe, GCC Patches, Mike Stump

On Sun, Nov 9, 2014 at 5:57 PM, Jack Howarth <howarth.at.gcc@gmail.com> wrote:
> Iain,
>      It doesn't look like it will be that simple. If I replace the
> proposed patches with a change like...
>
> Index: gcc/system.h
> ===================================================================
> --- gcc/system.h        (revision 217238)
> +++ gcc/system.h        (working copy)
> @@ -194,6 +194,13 @@ extern int fprintf_unlocked (FILE *, con
>  #undef fread_unlocked
>  #undef fwrite_unlocked
>
> +/* Include <string> before "safe-ctype.h" to avoid avoid GCC poisoning
> +the ctype macros through safe-ctype.h */
> +
> +#ifdef __cplusplus
> +# include <string>
> +#endif
> +

Indeed <string> is a system header and should not have been included
from tree-chkp.c but system.h.

Richard.

>  /* There are an extraordinary number of issues with <ctype.h>.
>     The last straw is that it varies with the locale.  Use libiberty's
>     replacement instead.  */
>
> The bootstrap fails at a new place with...
>
> make[3]: Entering directory
> '/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc'
> g++ -c   -g  -DIN_GCC    -fno-exceptions -fno-rtti
> -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
> -Wcast-qual -Wno-format -Wmissing-format-attribute
> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
> -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
> -I../../gcc-5.0-20141107/gcc -I../../gcc-5.0-20141107/gcc/.
> -I../../gcc-5.0-20141107/gcc/../include
> -I../../gcc-5.0-20141107/gcc/../libcpp/include -I/sw/include
> -I/sw/include  -I../../gcc-5.0-20141107/gcc/../libdecnumber
> -I../../gcc-5.0-20141107/gcc/../libdecnumber/dpd -I../libdecnumber
> -I../../gcc-5.0-20141107/gcc/../libbacktrace -DCLOOG_INT_GMP
> -I/sw/include -DCLOOG_INT_GMP -I/sw/include -I/sw/include -o
> simplify-rtx.o -MT simplify-rtx.o -MMD -MP -MF
> ./.deps/simplify-rtx.TPo ../../gcc-5.0-20141107/gcc/simplify-rtx.c
> clang: warning: treating 'c' input as 'c++' when in C++ mode, this
> behavior is deprecated
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:23:
> ../../gcc-5.0-20141107/gcc/coretypes.h:62:1: warning: class 'rtx_def'
> was previously declared as a struct [-Wmismatched-tags]
> class rtx_def;
> ^
> ../../gcc-5.0-20141107/gcc/coretypes.h:55:8: note: previous use is here
> struct rtx_def;
>        ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:27:
> In file included from ../../gcc-5.0-20141107/gcc/real.h:25:
> ../../gcc-5.0-20141107/gcc/wide-int.h:370:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:377:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:384:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:394:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:401:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:411:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:422:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:886:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:965:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/wide-int.h:1127:1: warning:
> 'fixed_wide_int_storage' defined as a class template here but
> previously declared as a struct template
>       [-Wmismatched-tags]
> class GTY(()) fixed_wide_int_storage
> ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:286:18: note: did you mean class here?
> template <int N> struct fixed_wide_int_storage;
>                  ^~~~~~
>                  class
> ../../gcc-5.0-20141107/gcc/wide-int.h:1152:3: warning: extraneous
> template parameter list in template specialization
>   template <>
>   ^~~~~~~~~~~
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:28:
> In file included from ../../gcc-5.0-20141107/gcc/vec.h:44:
> ../../gcc-5.0-20141107/gcc/ggc.h:315:15: warning: struct 'rtx_def' was
> previously declared as a class [-Wmismatched-tags]
> static inline struct rtx_def *
>               ^
> ../../gcc-5.0-20141107/gcc/coretypes.h:62:7: note: previous use is here
> class rtx_def;
>       ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:28:
> In file included from ../../gcc-5.0-20141107/gcc/vec.h:44:
> ../../gcc-5.0-20141107/gcc/ggc.h:318:11: warning: struct 'rtx_def' was
> previously declared as a class [-Wmismatched-tags]
>   return (struct rtx_def *) ggc_internal_alloc (s PASS_MEM_STAT);
>           ^
> ../../gcc-5.0-20141107/gcc/coretypes.h:62:7: note: previous use is here
> class rtx_def;
>       ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> ../../gcc-5.0-20141107/gcc/rtl.h:283:1: warning: 'rtx_def' defined as
> a struct here but previously declared as a class [-Wmismatched-tags]
> struct GTY((desc("0"), tag("0"),
> ^
> ../../gcc-5.0-20141107/gcc/coretypes.h:62:1: note: did you mean struct here?
> class rtx_def;
> ^~~~~
> struct
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:3164:
> ./genrtl.h:435:3: warning: array index 1 is past the end of the array
> (which contains 1 element) [-Warray-bounds]
>   XWINT (rt, 1) = arg1;
>   ^          ~
> ../../gcc-5.0-20141107/gcc/rtl.h:1121:29: note: expanded from macro 'XWINT'
> #define XWINT(RTX, N)               ((RTX)->u.hwint[N])
>                                      ^
> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>     HOST_WIDE_INT hwint[1];
>     ^
> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
> 'HOST_WIDE_INT'
> #   define HOST_WIDE_INT long long
>                          ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:3164:
> ./genrtl.h:436:3: warning: array index 2 is past the end of the array
> (which contains 1 element) [-Warray-bounds]
>   XWINT (rt, 2) = arg2;
>   ^          ~
> ../../gcc-5.0-20141107/gcc/rtl.h:1121:29: note: expanded from macro 'XWINT'
> #define XWINT(RTX, N)               ((RTX)->u.hwint[N])
>                                      ^
> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>     HOST_WIDE_INT hwint[1];
>     ^
> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
> 'HOST_WIDE_INT'
> #   define HOST_WIDE_INT long long
>                          ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:911:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (asm_out)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:1519:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (sched)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:1549:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (simd_clone)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:1767:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (vectorize)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:3023:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (addr_space)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:4522:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (calls)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:5050:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (c)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:5203:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (cxx)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:5292:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (emutls)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:5398:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (target_option)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:5686:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (mode_switching)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
> In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
> ../../gcc-5.0-20141107/gcc/target.def:5689:1: warning: empty macro
> arguments are a C99 feature [-Wc99-extensions]
> HOOK_VECTOR_END (C90_EMPTY_HACK)
> ^
> ../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
> from macro 'HOOK_VECTOR_END'
> #define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
>                                                  ^
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:118:13: warning: array index
> 1 is past the end of the array (which contains 1 element)
> [-Warray-bounds]
>       val = CONST_DOUBLE_HIGH (x);
>             ^~~~~~~~~~~~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
> 'CONST_DOUBLE_HIGH'
> #define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
>                              ^           ~
> ../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
> #define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
>                                      ^
> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>     HOST_WIDE_INT hwint[1];
>     ^
> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
> 'HOST_WIDE_INT'
> #   define HOST_WIDE_INT long long
>                          ^
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:5368:9: warning: array index
> 1 is past the end of the array (which contains 1 element)
> [-Warray-bounds]
>                     = CONST_DOUBLE_HIGH (el) >> (i - HOST_BITS_PER_WIDE_INT);
>                       ^~~~~~~~~~~~~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
> 'CONST_DOUBLE_HIGH'
> #define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
>                              ^           ~
> ../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
> #define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
>                                      ^
> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>     HOST_WIDE_INT hwint[1];
>     ^
> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
> 'HOST_WIDE_INT'
> #   define HOST_WIDE_INT long long
>                          ^
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:5372:12: warning: array
> index 1 is past the end of the array (which contains 1 element)
> [-Warray-bounds]
>               if (CONST_DOUBLE_HIGH (el) >> (HOST_BITS_PER_WIDE_INT - 1))
>                   ^~~~~~~~~~~~~~~~~~~~~~
> ../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
> 'CONST_DOUBLE_HIGH'
> #define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
>                              ^           ~
> ../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
> #define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
>                                      ^
> ../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
>     HOST_WIDE_INT hwint[1];
>     ^
> ../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
> 'HOST_WIDE_INT'
> #   define HOST_WIDE_INT long long
>                          ^
> In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
> In file included from ../../gcc-5.0-20141107/gcc/rtl.h:27:
> In file included from ../../gcc-5.0-20141107/gcc/real.h:25:
> ../../gcc-5.0-20141107/gcc/wide-int.h:2132:10: error: call to 'min' is ambiguous
>   return min (x, y, SIGNED);
>          ^~~
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3898:17: note: in
> instantiation of function template specialization
> 'wi::smin<std::__1::pair<rtx_def *,
>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>           result = wi::smin (pop0, pop1);
>                        ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2536:1:
> note: candidate function [with _Tp
>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
> min(const _Tp& __a, const _Tp& __b, _Compare __comp)
> ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2116:5: note: candidate function
> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
> std::__1::pair<rtx_def *,
>       machine_mode>]
> wi::min (const T1 &x, const T2 &y, signop sgn)
>     ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2163:10: error: call to 'max' is ambiguous
>   return max (x, y, SIGNED);
>          ^~~
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3902:17: note: in
> instantiation of function template specialization
> 'wi::smax<std::__1::pair<rtx_def *,
>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>           result = wi::smax (pop0, pop1);
>                        ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2600:1:
> note: candidate function [with _Tp
>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
> max(const _Tp& __a, const _Tp& __b, _Compare __comp)
> ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2147:5: note: candidate function
> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
> std::__1::pair<rtx_def *,
>       machine_mode>]
> wi::max (const T1 &x, const T2 &y, signop sgn)
>     ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2140:10: error: call to 'min' is ambiguous
>   return min (x, y, UNSIGNED);
>          ^~~
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3906:17: note: in
> instantiation of function template specialization
> 'wi::umin<std::__1::pair<rtx_def *,
>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>           result = wi::umin (pop0, pop1);
>                        ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2536:1:
> note: candidate function [with _Tp
>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
> min(const _Tp& __a, const _Tp& __b, _Compare __comp)
> ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2116:5: note: candidate function
> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
> std::__1::pair<rtx_def *,
>       machine_mode>]
> wi::min (const T1 &x, const T2 &y, signop sgn)
>     ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2171:10: error: call to 'max' is ambiguous
>   return max (x, y, UNSIGNED);
>          ^~~
> ../../gcc-5.0-20141107/gcc/simplify-rtx.c:3910:17: note: in
> instantiation of function template specialization
> 'wi::umax<std::__1::pair<rtx_def *,
>       machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
>           result = wi::umax (pop0, pop1);
>                        ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2600:1:
> note: candidate function [with _Tp
>       = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
> max(const _Tp& __a, const _Tp& __b, _Compare __comp)
> ^
> ../../gcc-5.0-20141107/gcc/wide-int.h:2147:5: note: candidate function
> [with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
> std::__1::pair<rtx_def *,
>       machine_mode>]
> wi::max (const T1 &x, const T2 &y, signop sgn)
>     ^
> 32 warnings and 4 errors generated.
>
> I think we are better off for the moment going with the conservative
> fix (as only two files in all of gcc need it).
>                Jack
>
> On Sun, Nov 9, 2014 at 9:53 AM, Iain Sandoe <iain@codesourcery.com> wrote:
>> Hi Jack,
>>
>> comments below apply also to the patch for PR63699
>>
>> On 7 Nov 2014, at 17:13, Jack Howarth wrote:
>>
>>>  The attached revised patch eliminates the compilation error...
>>>
>>> error: use of undeclared
>>>      identifier 'do_not_use_toupper_with_safe_ctype'
>>>
>>> on x86_64-apple-darwin14 when bootstrapping using the Clang 6.0
>>> compiler by moving the include for <strings> earlier.
>>>          Okay for gcc trunk?
>>>                  Jack
>>> <PR63750_v3.patch>
>>
>> Since you have two instances of this (and given that the other required headers are included in system.h)
>> ISTM, that the right place for this (and the fix for PR63699) is in system.h with appropriate guards for cplusplus and an explanation of why the fix is needed.
>>
>> Need to make sure we're not just burying some other problem, right?
>> 0.02GBP as always
>> Iain
>>
>> 2014-10-07  Jack Howarth <howarth.at.gcc@gmail.com>
>>
>>         PR other/63750
>>         * gcc/ipa-chkp.c: Include string earlier.
>>
>> In any event, if the existing patch is preferred by the maintainers,  please make this ^ something like
>> "Include <string> before system.h"
>> to give to poor reader some idea of what the change was about ;)
>>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-09 14:53 ` Iain Sandoe
@ 2014-11-09 16:57   ` Jack Howarth
  2014-11-10 12:00     ` Richard Biener
  0 siblings, 1 reply; 12+ messages in thread
From: Jack Howarth @ 2014-11-09 16:57 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: gcc-patches, mikestump

Iain,
     It doesn't look like it will be that simple. If I replace the
proposed patches with a change like...

Index: gcc/system.h
===================================================================
--- gcc/system.h        (revision 217238)
+++ gcc/system.h        (working copy)
@@ -194,6 +194,13 @@ extern int fprintf_unlocked (FILE *, con
 #undef fread_unlocked
 #undef fwrite_unlocked

+/* Include <string> before "safe-ctype.h" to avoid avoid GCC poisoning
+the ctype macros through safe-ctype.h */
+
+#ifdef __cplusplus
+# include <string>
+#endif
+
 /* There are an extraordinary number of issues with <ctype.h>.
    The last straw is that it varies with the locale.  Use libiberty's
    replacement instead.  */

The bootstrap fails at a new place with...

make[3]: Entering directory
'/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc'
g++ -c   -g  -DIN_GCC    -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../gcc-5.0-20141107/gcc -I../../gcc-5.0-20141107/gcc/.
-I../../gcc-5.0-20141107/gcc/../include
-I../../gcc-5.0-20141107/gcc/../libcpp/include -I/sw/include
-I/sw/include  -I../../gcc-5.0-20141107/gcc/../libdecnumber
-I../../gcc-5.0-20141107/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc-5.0-20141107/gcc/../libbacktrace -DCLOOG_INT_GMP
-I/sw/include -DCLOOG_INT_GMP -I/sw/include -I/sw/include -o
simplify-rtx.o -MT simplify-rtx.o -MMD -MP -MF
./.deps/simplify-rtx.TPo ../../gcc-5.0-20141107/gcc/simplify-rtx.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this
behavior is deprecated
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:23:
../../gcc-5.0-20141107/gcc/coretypes.h:62:1: warning: class 'rtx_def'
was previously declared as a struct [-Wmismatched-tags]
class rtx_def;
^
../../gcc-5.0-20141107/gcc/coretypes.h:55:8: note: previous use is here
struct rtx_def;
       ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
In file included from ../../gcc-5.0-20141107/gcc/rtl.h:27:
In file included from ../../gcc-5.0-20141107/gcc/real.h:25:
../../gcc-5.0-20141107/gcc/wide-int.h:370:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:377:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:384:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:394:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:401:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:411:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:422:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:886:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:965:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
../../gcc-5.0-20141107/gcc/wide-int.h:1127:1: warning:
'fixed_wide_int_storage' defined as a class template here but
previously declared as a struct template
      [-Wmismatched-tags]
class GTY(()) fixed_wide_int_storage
^
../../gcc-5.0-20141107/gcc/wide-int.h:286:18: note: did you mean class here?
template <int N> struct fixed_wide_int_storage;
                 ^~~~~~
                 class
../../gcc-5.0-20141107/gcc/wide-int.h:1152:3: warning: extraneous
template parameter list in template specialization
  template <>
  ^~~~~~~~~~~
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
In file included from ../../gcc-5.0-20141107/gcc/rtl.h:28:
In file included from ../../gcc-5.0-20141107/gcc/vec.h:44:
../../gcc-5.0-20141107/gcc/ggc.h:315:15: warning: struct 'rtx_def' was
previously declared as a class [-Wmismatched-tags]
static inline struct rtx_def *
              ^
../../gcc-5.0-20141107/gcc/coretypes.h:62:7: note: previous use is here
class rtx_def;
      ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
In file included from ../../gcc-5.0-20141107/gcc/rtl.h:28:
In file included from ../../gcc-5.0-20141107/gcc/vec.h:44:
../../gcc-5.0-20141107/gcc/ggc.h:318:11: warning: struct 'rtx_def' was
previously declared as a class [-Wmismatched-tags]
  return (struct rtx_def *) ggc_internal_alloc (s PASS_MEM_STAT);
          ^
../../gcc-5.0-20141107/gcc/coretypes.h:62:7: note: previous use is here
class rtx_def;
      ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
../../gcc-5.0-20141107/gcc/rtl.h:283:1: warning: 'rtx_def' defined as
a struct here but previously declared as a class [-Wmismatched-tags]
struct GTY((desc("0"), tag("0"),
^
../../gcc-5.0-20141107/gcc/coretypes.h:62:1: note: did you mean struct here?
class rtx_def;
^~~~~
struct
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
In file included from ../../gcc-5.0-20141107/gcc/rtl.h:3164:
./genrtl.h:435:3: warning: array index 1 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  XWINT (rt, 1) = arg1;
  ^          ~
../../gcc-5.0-20141107/gcc/rtl.h:1121:29: note: expanded from macro 'XWINT'
#define XWINT(RTX, N)               ((RTX)->u.hwint[N])
                                     ^
../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
    HOST_WIDE_INT hwint[1];
    ^
../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
'HOST_WIDE_INT'
#   define HOST_WIDE_INT long long
                         ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
In file included from ../../gcc-5.0-20141107/gcc/rtl.h:3164:
./genrtl.h:436:3: warning: array index 2 is past the end of the array
(which contains 1 element) [-Warray-bounds]
  XWINT (rt, 2) = arg2;
  ^          ~
../../gcc-5.0-20141107/gcc/rtl.h:1121:29: note: expanded from macro 'XWINT'
#define XWINT(RTX, N)               ((RTX)->u.hwint[N])
                                     ^
../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
    HOST_WIDE_INT hwint[1];
    ^
../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
'HOST_WIDE_INT'
#   define HOST_WIDE_INT long long
                         ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:911:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (asm_out)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:1519:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (sched)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:1549:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (simd_clone)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:1767:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (vectorize)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:3023:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (addr_space)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:4522:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (calls)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:5050:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (c)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:5203:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (cxx)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:5292:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (emutls)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:5398:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (target_option)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:5686:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (mode_switching)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:45:
In file included from ../../gcc-5.0-20141107/gcc/target.h:192:
../../gcc-5.0-20141107/gcc/target.def:5689:1: warning: empty macro
arguments are a C99 feature [-Wc99-extensions]
HOOK_VECTOR_END (C90_EMPTY_HACK)
^
../../gcc-5.0-20141107/gcc/target-hooks-macros.h:43:50: note: expanded
from macro 'HOOK_VECTOR_END'
#define HOOK_VECTOR_END(DECL_NAME) HOOK_VECTOR_1(,} DECL_NAME ;)
                                                 ^
../../gcc-5.0-20141107/gcc/simplify-rtx.c:118:13: warning: array index
1 is past the end of the array (which contains 1 element)
[-Warray-bounds]
      val = CONST_DOUBLE_HIGH (x);
            ^~~~~~~~~~~~~~~~~~~~~
../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
'CONST_DOUBLE_HIGH'
#define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
                             ^           ~
../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
#define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
                                     ^
../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
    HOST_WIDE_INT hwint[1];
    ^
../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
'HOST_WIDE_INT'
#   define HOST_WIDE_INT long long
                         ^
../../gcc-5.0-20141107/gcc/simplify-rtx.c:5368:9: warning: array index
1 is past the end of the array (which contains 1 element)
[-Warray-bounds]
                    = CONST_DOUBLE_HIGH (el) >> (i - HOST_BITS_PER_WIDE_INT);
                      ^~~~~~~~~~~~~~~~~~~~~~
../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
'CONST_DOUBLE_HIGH'
#define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
                             ^           ~
../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
#define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
                                     ^
../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
    HOST_WIDE_INT hwint[1];
    ^
../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
'HOST_WIDE_INT'
#   define HOST_WIDE_INT long long
                         ^
../../gcc-5.0-20141107/gcc/simplify-rtx.c:5372:12: warning: array
index 1 is past the end of the array (which contains 1 element)
[-Warray-bounds]
              if (CONST_DOUBLE_HIGH (el) >> (HOST_BITS_PER_WIDE_INT - 1))
                  ^~~~~~~~~~~~~~~~~~~~~~
../../gcc-5.0-20141107/gcc/rtl.h:1758:30: note: expanded from macro
'CONST_DOUBLE_HIGH'
#define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
                             ^           ~
../../gcc-5.0-20141107/gcc/rtl.h:1124:36: note: expanded from macro 'XCMWINT'
#define XCMWINT(RTX, N, C, M)       ((RTX)->u.hwint[N])
                                     ^
../../gcc-5.0-20141107/gcc/rtl.h:398:5: note: array 'hwint' declared here
    HOST_WIDE_INT hwint[1];
    ^
../../gcc-5.0-20141107/gcc/hwint.h:58:26: note: expanded from macro
'HOST_WIDE_INT'
#   define HOST_WIDE_INT long long
                         ^
In file included from ../../gcc-5.0-20141107/gcc/simplify-rtx.c:25:
In file included from ../../gcc-5.0-20141107/gcc/rtl.h:27:
In file included from ../../gcc-5.0-20141107/gcc/real.h:25:
../../gcc-5.0-20141107/gcc/wide-int.h:2132:10: error: call to 'min' is ambiguous
  return min (x, y, SIGNED);
         ^~~
../../gcc-5.0-20141107/gcc/simplify-rtx.c:3898:17: note: in
instantiation of function template specialization
'wi::smin<std::__1::pair<rtx_def *,
      machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
          result = wi::smin (pop0, pop1);
                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2536:1:
note: candidate function [with _Tp
      = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
../../gcc-5.0-20141107/gcc/wide-int.h:2116:5: note: candidate function
[with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
std::__1::pair<rtx_def *,
      machine_mode>]
wi::min (const T1 &x, const T2 &y, signop sgn)
    ^
../../gcc-5.0-20141107/gcc/wide-int.h:2163:10: error: call to 'max' is ambiguous
  return max (x, y, SIGNED);
         ^~~
../../gcc-5.0-20141107/gcc/simplify-rtx.c:3902:17: note: in
instantiation of function template specialization
'wi::smax<std::__1::pair<rtx_def *,
      machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
          result = wi::smax (pop0, pop1);
                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2600:1:
note: candidate function [with _Tp
      = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
../../gcc-5.0-20141107/gcc/wide-int.h:2147:5: note: candidate function
[with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
std::__1::pair<rtx_def *,
      machine_mode>]
wi::max (const T1 &x, const T2 &y, signop sgn)
    ^
../../gcc-5.0-20141107/gcc/wide-int.h:2140:10: error: call to 'min' is ambiguous
  return min (x, y, UNSIGNED);
         ^~~
../../gcc-5.0-20141107/gcc/simplify-rtx.c:3906:17: note: in
instantiation of function template specialization
'wi::umin<std::__1::pair<rtx_def *,
      machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
          result = wi::umin (pop0, pop1);
                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2536:1:
note: candidate function [with _Tp
      = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
../../gcc-5.0-20141107/gcc/wide-int.h:2116:5: note: candidate function
[with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
std::__1::pair<rtx_def *,
      machine_mode>]
wi::min (const T1 &x, const T2 &y, signop sgn)
    ^
../../gcc-5.0-20141107/gcc/wide-int.h:2171:10: error: call to 'max' is ambiguous
  return max (x, y, UNSIGNED);
         ^~~
../../gcc-5.0-20141107/gcc/simplify-rtx.c:3910:17: note: in
instantiation of function template specialization
'wi::umax<std::__1::pair<rtx_def *,
      machine_mode>, std::__1::pair<rtx_def *, machine_mode> >' requested here
          result = wi::umax (pop0, pop1);
                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:2600:1:
note: candidate function [with _Tp
      = std::__1::pair<rtx_def *, machine_mode>, _Compare = signop_e]
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
../../gcc-5.0-20141107/gcc/wide-int.h:2147:5: note: candidate function
[with T1 = std::__1::pair<rtx_def *, machine_mode>, T2 =
std::__1::pair<rtx_def *,
      machine_mode>]
wi::max (const T1 &x, const T2 &y, signop sgn)
    ^
32 warnings and 4 errors generated.

I think we are better off for the moment going with the conservative
fix (as only two files in all of gcc need it).
               Jack

On Sun, Nov 9, 2014 at 9:53 AM, Iain Sandoe <iain@codesourcery.com> wrote:
> Hi Jack,
>
> comments below apply also to the patch for PR63699
>
> On 7 Nov 2014, at 17:13, Jack Howarth wrote:
>
>>  The attached revised patch eliminates the compilation error...
>>
>> error: use of undeclared
>>      identifier 'do_not_use_toupper_with_safe_ctype'
>>
>> on x86_64-apple-darwin14 when bootstrapping using the Clang 6.0
>> compiler by moving the include for <strings> earlier.
>>          Okay for gcc trunk?
>>                  Jack
>> <PR63750_v3.patch>
>
> Since you have two instances of this (and given that the other required headers are included in system.h)
> ISTM, that the right place for this (and the fix for PR63699) is in system.h with appropriate guards for cplusplus and an explanation of why the fix is needed.
>
> Need to make sure we're not just burying some other problem, right?
> 0.02GBP as always
> Iain
>
> 2014-10-07  Jack Howarth <howarth.at.gcc@gmail.com>
>
>         PR other/63750
>         * gcc/ipa-chkp.c: Include string earlier.
>
> In any event, if the existing patch is preferred by the maintainers,  please make this ^ something like
> "Include <string> before system.h"
> to give to poor reader some idea of what the change was about ;)
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH][Revisedx2] Fix PR63750
  2014-11-07 17:13 Jack Howarth
@ 2014-11-09 14:53 ` Iain Sandoe
  2014-11-09 16:57   ` Jack Howarth
  0 siblings, 1 reply; 12+ messages in thread
From: Iain Sandoe @ 2014-11-09 14:53 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc-patches, mikestump

Hi Jack,

comments below apply also to the patch for PR63699

On 7 Nov 2014, at 17:13, Jack Howarth wrote:

>  The attached revised patch eliminates the compilation error...
> 
> error: use of undeclared
>      identifier 'do_not_use_toupper_with_safe_ctype'
> 
> on x86_64-apple-darwin14 when bootstrapping using the Clang 6.0
> compiler by moving the include for <strings> earlier.
>          Okay for gcc trunk?
>                  Jack
> <PR63750_v3.patch>

Since you have two instances of this (and given that the other required headers are included in system.h)
ISTM, that the right place for this (and the fix for PR63699) is in system.h with appropriate guards for cplusplus and an explanation of why the fix is needed.

Need to make sure we're not just burying some other problem, right?
0.02GBP as always
Iain

2014-10-07  Jack Howarth <howarth.at.gcc@gmail.com>

	PR other/63750
	* gcc/ipa-chkp.c: Include string earlier.

In any event, if the existing patch is preferred by the maintainers,  please make this ^ something like 
"Include <string> before system.h" 
to give to poor reader some idea of what the change was about ;)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH][Revisedx2] Fix PR63750
@ 2014-11-07 17:13 Jack Howarth
  2014-11-09 14:53 ` Iain Sandoe
  0 siblings, 1 reply; 12+ messages in thread
From: Jack Howarth @ 2014-11-07 17:13 UTC (permalink / raw)
  To: gcc-patches, mikestump, iain

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

  The attached revised patch eliminates the compilation error...

 error: use of undeclared
      identifier 'do_not_use_toupper_with_safe_ctype'

on x86_64-apple-darwin14 when bootstrapping using the Clang 6.0
compiler by moving the include for <strings> earlier.
          Okay for gcc trunk?
                  Jack

[-- Attachment #2: PR63750_v3.patch --]
[-- Type: application/octet-stream, Size: 711 bytes --]

2014-10-07  Jack Howarth <howarth.at.gcc@gmail.com>

	PR other/63750
	* gcc/ipa-chkp.c: Include string earlier.

Index: gcc/ipa-chkp.c
===================================================================
--- gcc/ipa-chkp.c	(revision 217222)
+++ gcc/ipa-chkp.c	(working copy)
@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3.  
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
+#include <string>
 #include "system.h"
 #include "coretypes.h"
 #include "tree-core.h"
@@ -41,7 +42,6 @@ along with GCC; see the file COPYING3.  
 #include "cgraph.h"
 #include "tree-chkp.h"
 #include "ipa-chkp.h"
-#include <string>
 
 /*  Pointer Bounds Checker has two IPA passes to support code instrumentation.
 

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-11-11  9:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-10 14:58 [PATCH][Revisedx2] Fix PR63750 FX
2014-11-10 15:02 ` FX
2014-11-10 17:25   ` Jack Howarth
2014-11-10 18:15   ` Mike Stump
2014-11-10 19:03     ` Mike Stump
2014-11-11  9:15   ` Richard Biener
2014-11-11  9:23     ` FX
  -- strict thread matches above, loose matches on Subject: below --
2014-11-07 17:13 Jack Howarth
2014-11-09 14:53 ` Iain Sandoe
2014-11-09 16:57   ` Jack Howarth
2014-11-10 12:00     ` Richard Biener
2014-11-10 13:09       ` Ilya Enkovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).