Re: [bootstrap] Tentative fix for PR 54281

2012-08-20 Thread Diego Novillo
On 2012-08-19 07:18 , Arnaud Charlet wrote: The conditionals cannot be removed for the time being because the foreign language interface of the Ada part of the compiler is hardcoded for C. Barring a massive switch to the Ada language for the GNU project, we would need to switch the foreign lan

Re: [bootstrap] Tentative fix for PR 54281

2012-08-19 Thread Arnaud Charlet
> The conditionals cannot be removed for the time being because the foreign > language interface of the Ada part of the compiler is hardcoded for C. > > Barring a massive switch to the Ada language for the GNU project, we would > need > to switch the foreign language interface to C++, which mi

Re: [bootstrap] Tentative fix for PR 54281

2012-08-19 Thread Eric Botcazou
[Sorry for the delay] > So, I had failed to include Ada in my testing and my patch breaks it. > In several ada/*.c files, we forcefully include system.h as a C header: > > #ifdef __cplusplus > extern "C" { > #endif > ... > #include "system.h" > ... > #ifdef __cplusplus > } > #endif > > > Eric,

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Diego Novillo
On Fri, Aug 17, 2012 at 11:05 AM, Jakub Jelinek wrote: > On Fri, Aug 17, 2012 at 10:58:25AM -0400, Diego Novillo wrote: >> Sounds reasonable. Amended patch attached. > >> OK for trunk? > > Yes, except for: > >> diff --git a/gcc/ChangeLog b/gcc/ChangeLog >> index c9a81d1..43b0af7 100644 >> --- a/g

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Jakub Jelinek
On Fri, Aug 17, 2012 at 10:58:25AM -0400, Diego Novillo wrote: > Sounds reasonable. Amended patch attached. > OK for trunk? Yes, except for: > diff --git a/gcc/ChangeLog b/gcc/ChangeLog > index c9a81d1..43b0af7 100644 > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -213,7 +222,7 @@ > * c

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Diego Novillo
On 12-08-17 08:32 , Jakub Jelinek wrote: Hi! On Fri, Aug 17, 2012 at 08:23:02AM -0400, Diego Novillo wrote: --- a/gcc/intl.h +++ b/gcc/intl.h @@ -27,8 +27,16 @@ # define setlocale(category, locale) (locale) #endif +/* If libintl.h is available, include it before testing for NLS. If we +

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Ian Lance Taylor
On Fri, Aug 17, 2012 at 5:32 AM, Jakub Jelinek wrote: > > Will that handle even the case where without --disable-nls intl/ > creates its own libintl.h? Dunno which targets need that, but > I'd guess configury wouldn't find it in that case. So perhaps > it should be #if defined(HAVE_LIBINTL_H) ||

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Jakub Jelinek
Hi! On Fri, Aug 17, 2012 at 08:23:02AM -0400, Diego Novillo wrote: > --- a/gcc/intl.h > +++ b/gcc/intl.h > @@ -27,8 +27,16 @@ > # define setlocale(category, locale) (locale) > #endif > > +/* If libintl.h is available, include it before testing for NLS. If we > + are building with --disable-

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Diego Novillo
On 12-08-16 20:29 , Ian Lance Taylor wrote: I recommend that you add libintl.h to the AC_CHECK_HEADERS list in gcc/configure.ac Thanks. The attached patch implements the approach. Tested with --disable-nls and --enable-nls. Folks with 4.1 compilers, could you test it there? OK for trunk

Re: [bootstrap] Tentative fix for PR 54281

2012-08-17 Thread Richard Guenther
On Thu, 16 Aug 2012, Ian Lance Taylor wrote: > On Thu, Aug 16, 2012 at 12:12 PM, Diego Novillo wrote: > > > > This is the patch I'm currently testing. I need someone with a very old > > toolchain (4.1 or earlier) to also give this a try (the original problem > > does not occur in g++ more recent

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Hans-Peter Nilsson
> From: Diego Novillo > Date: Thu, 16 Aug 2012 21:12:56 +0200 > On 12-08-16 15:00 , Diego Novillo wrote: > This is the patch I'm currently testing. I need someone with a very old > toolchain (4.1 or earlier) to also give this a try (the original problem > does not occur in g++ more recent than

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Ian Lance Taylor
On Thu, Aug 16, 2012 at 12:12 PM, Diego Novillo wrote: > > This is the patch I'm currently testing. I need someone with a very old > toolchain (4.1 or earlier) to also give this a try (the original problem > does not occur in g++ more recent than 4.1). > > > Thanks. Diego. > > diff --git a/gcc/C

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
On 12-08-16 15:00 , Diego Novillo wrote: On 12-08-16 14:46 , Joseph S. Myers wrote: On Thu, 16 Aug 2012, Diego Novillo wrote: diff --git a/gcc/intl.h b/gcc/intl.h index c4db354..745fefd 100644 --- a/gcc/intl.h +++ b/gcc/intl.h @@ -27,8 +27,8 @@ # define setlocale(category, locale) (locale)

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
On 12-08-16 14:46 , Joseph S. Myers wrote: On Thu, 16 Aug 2012, Diego Novillo wrote: diff --git a/gcc/intl.h b/gcc/intl.h index c4db354..745fefd 100644 --- a/gcc/intl.h +++ b/gcc/intl.h @@ -27,8 +27,8 @@ # define setlocale(category, locale) (locale) #endif -#ifdef ENABLE_NLS #include +#

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Joseph S. Myers
On Thu, 16 Aug 2012, Diego Novillo wrote: > diff --git a/gcc/intl.h b/gcc/intl.h > index c4db354..745fefd 100644 > --- a/gcc/intl.h > +++ b/gcc/intl.h > @@ -27,8 +27,8 @@ > # define setlocale(category, locale) (locale) > #endif > > -#ifdef ENABLE_NLS > #include > +#ifdef ENABLE_NLS I'm not s

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
I have reverted my original fix and propose this one. My fix caused build failures in Ada (which includes system.h inside 'extern "C"' blocks) and it also breaks in-tree isl/cloog. Richi, I've tried building my own 4.1, but it doesn't build on my system. Could you try this patch? It include

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
On Thu, Aug 16, 2012 at 1:50 PM, Magnus Fromreide wrote: > On Thu, Aug 16, 2012 at 07:55:51AM -0400, Diego Novillo wrote: >> Richi, this implements your idea for fixing PR 54281. I don't >> have an old enough compiler. Could you please test it in your >> system? >> >> I debated whether to remove

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Magnus Fromreide
On Thu, Aug 16, 2012 at 07:55:51AM -0400, Diego Novillo wrote: > Richi, this implements your idea for fixing PR 54281. I don't > have an old enough compiler. Could you please test it in your > system? > > I debated whether to remove the GENERATOR_FILE predicate from the > inclusion (some files i

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
On 12-08-16 09:08 , Richard Guenther wrote: On Thu, 16 Aug 2012, Diego Novillo wrote: Richi, this implements your idea for fixing PR 54281. I don't have an old enough compiler. Could you please test it in your system? I debated whether to remove the GENERATOR_FILE predicate from the inclusio

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
On 12-08-16 09:08 , Richard Guenther wrote: It fixes it. Thus, ok from my side (if your testing succeeds). Worked here too. Committed to trunk. Diego.

Re: [bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Richard Guenther
On Thu, 16 Aug 2012, Diego Novillo wrote: > Richi, this implements your idea for fixing PR 54281. I don't > have an old enough compiler. Could you please test it in your > system? > > I debated whether to remove the GENERATOR_FILE predicate from the > inclusion (some files include gmp.h uncondi

[bootstrap] Tentative fix for PR 54281

2012-08-16 Thread Diego Novillo
Richi, this implements your idea for fixing PR 54281. I don't have an old enough compiler. Could you please test it in your system? I debated whether to remove the GENERATOR_FILE predicate from the inclusion (some files include gmp.h unconditionally). I think it could be removed, but only a min