Re: [PATCH][Revisedx2] Fix PR63750
> Ok. Committed as rev. 217342. Thanks for the review! FX
Re: [PATCH][Revisedx2] Fix PR63750
On Mon, Nov 10, 2014 at 3:58 PM, FX 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.
Re: [PATCH][Revisedx2] Fix PR63750
On Nov 10, 2014, at 10:10 AM, Mike Stump 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.
Re: [PATCH][Revisedx2] Fix PR63750
On Nov 10, 2014, at 6:58 AM, FX 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.
Re: [PATCH][Revisedx2] Fix PR63750
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 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? >
Re: [PATCH][Revisedx2] Fix PR63750
> 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? string.diff Description: Binary data string.ChangeLog Description: Binary data
Re: [PATCH][Revisedx2] Fix PR63750
> Indeed 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 string.diff Description: Binary data string.ChangeLog Description: Binary data
Re: [PATCH][Revisedx2] Fix PR63750
2014-11-10 14:53 GMT+03:00 Richard Biener : > On Sun, Nov 9, 2014 at 5:57 PM, Jack Howarth 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 before "safe-ctype.h" to avoid avoid GCC poisoning >> +the ctype macros through safe-ctype.h */ >> + >> +#ifdef __cplusplus >> +# include >> +#endif >> + > > Indeed 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 . >> 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 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 >>
Re: [PATCH][Revisedx2] Fix PR63750
On Sun, Nov 9, 2014 at 5:57 PM, Jack Howarth 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 before "safe-ctype.h" to avoid avoid GCC poisoning > +the ctype macros through safe-ctype.h */ > + > +#ifdef __cplusplus > +# include > +#endif > + Indeed 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 . > 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 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
Re: [PATCH][Revisedx2] Fix PR63750
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 before "safe-ctype.h" to avoid avoid GCC poisoning +the ctype macros through safe-ctype.h */ + +#ifdef __cplusplus +# include +#endif + /* There are an extraordinary number of issues with . 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 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 fi
Re: [PATCH][Revisedx2] Fix PR63750
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 earlier. > Okay for gcc trunk? > Jack > 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 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 before system.h" to give to poor reader some idea of what the change was about ;)
[PATCH][Revisedx2] Fix PR63750
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 earlier. Okay for gcc trunk? Jack PR63750_v3.patch Description: Binary data