Re: Selecting a C++ standard

2013-01-10 Thread Paul Eggert
On 01/10/2013 09:19 PM, Dave Goodell wrote: > There were some contrived examples, as well as one slightly less > contrived one that had to do with enum scoping differences between > C89 and C99: > > http://lists.gnu.org/archive/html/autoconf/2012-10/msg00080.html I dunno, that one's pretty contr

Re: Selecting a C++ standard

2013-01-10 Thread Dave Goodell
On Jan 10, 2013, at 5:37 PM CST, Paul Eggert wrote: > On 01/10/2013 03:00 PM, Roger Leigh wrote: >> Given in the discussion that examples were provided where selecting >> the latest version was not always a desirable behaviour, > > Sorry, I don't recall the examples. There were some contrived ex

Re: Selecting a C++ standard

2013-01-10 Thread Paul Eggert
On 01/10/2013 03:00 PM, Roger Leigh wrote: > Given in the discussion that examples were provided where selecting > the latest version was not always a desirable behaviour, Sorry, I don't recall the examples. Is it likely that that some packages won't want -std=gnu++11, but other packages will? A

Re: Selecting a C++ standard

2013-01-10 Thread Roger Leigh
On Sat, Oct 27, 2012 at 01:55:58PM -0700, Paul Eggert wrote: > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > Is anyone working on such a thing? > > Not that I know of. > > For C, we're deprecating the "I want version X" > macros in favor of just AC_PROG_CC_STDC, which says > "I want the latest v

Re: Selecting a C++ standard

2012-11-03 Thread Andrew W. Nosenko
On Sat, Nov 3, 2012 at 8:08 PM, Florian Weimer wrote: > * Andrew W. Nosenko: > >>> I've since checked, and it was was with 4.7.1. >>> >>> Linking C++98 and C++11 code together is still officially unsupported, >>> even if it is supposed to work if you just use libstdc++. So I think >>> it's wrong

Re: Selecting a C++ standard

2012-11-03 Thread Florian Weimer
* Andrew W. Nosenko: >> I've since checked, and it was was with 4.7.1. >> >> Linking C++98 and C++11 code together is still officially unsupported, >> even if it is supposed to work if you just use libstdc++. So I think >> it's wrong to automatically default to C++11 when available. > > Why? Bec

Re: Selecting a C++ standard

2012-11-03 Thread Andrew W. Nosenko
On Sat, Nov 3, 2012 at 6:42 PM, Florian Weimer wrote: > * Florian Weimer: > >> * Andrew W. Nosenko: >> >>> ABI break by gcc-4.7.0 and 4.7.1 in c++11 mode was a bug (or >>> misfeature, call it as you want). Fixed in gcc-4.7.2. >>> From http://gcc.gnu.org/gcc-4.7/changes.html : >> >> I've seen simi

Re: Selecting a C++ standard

2012-11-03 Thread Florian Weimer
* Florian Weimer: > * Andrew W. Nosenko: > >> ABI break by gcc-4.7.0 and 4.7.1 in c++11 mode was a bug (or >> misfeature, call it as you want). Fixed in gcc-4.7.2. >> From http://gcc.gnu.org/gcc-4.7/changes.html : > > I've seen similar issues with GCC 4.7.2. I thought that this was > expected, s

Re: Selecting a C++ standard

2012-10-30 Thread Paul Eggert
On 10/30/2012 09:11 AM, Adrian Bunk wrote: > if your example program would be built using autoconf, it would > behave differently depending on the autoconf version used. Yes, it's possible to write C89 programs that silently change meaning if compiled with C99. Here's an other example, which I g

Re: Selecting a C++ standard

2012-10-30 Thread Trent Nelson
On Sat, Oct 27, 2012 at 05:07:04PM -0700, Harlan Stenn wrote: > Adrian Bunk writes: > > On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: > > > Maybe have an optional argument to AC_PROG_CC_STDC to select > > > the standard e.g. > > > AC_PROG_CC_STDC([C99]) > > > ? > > I like this ide

Re: Selecting a C++ standard

2012-10-30 Thread Adrian Bunk
On Tue, Oct 30, 2012 at 11:43:59AM -0400, Nick Bowler wrote: > On 2012-10-30 16:35 +0200, Adrian Bunk wrote: > > On Sun, Oct 28, 2012 at 11:46:51AM -0500, Bob Friesenhahn wrote: > > >... > > > If the code was written for C89 then I am likely to want to continue > > > compiling it for C89 if possibl

Re: Selecting a C++ standard

2012-10-30 Thread Nick Bowler
On 2012-10-30 16:35 +0200, Adrian Bunk wrote: > On Sun, Oct 28, 2012 at 11:46:51AM -0500, Bob Friesenhahn wrote: > >... > > If the code was written for C89 then I am likely to want to continue > > compiling it for C89 if possible but also allow "best effort" if the > > compiler does not have a C89

Re: Selecting a C++ standard

2012-10-30 Thread Adrian Bunk
On Sun, Oct 28, 2012 at 11:46:51AM -0500, Bob Friesenhahn wrote: >... > If the code was written for C89 then I am likely to want to continue > compiling it for C89 if possible but also allow "best effort" if the > compiler does not have a C89 mode. If the code is updated to also > work properly fo

Re: Selecting a C++ standard

2012-10-30 Thread Adrian Bunk
On Mon, Oct 29, 2012 at 10:50:10PM -0400, Trent Nelson wrote: > On Sat, Oct 27, 2012 at 05:07:04PM -0700, Harlan Stenn wrote: > > Adrian Bunk writes: > > > On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: > > > > Maybe have an optional argument to AC_PROG_CC_STDC to select > > > > the s

Re: Selecting a C++ standard

2012-10-28 Thread Adrian Bunk
On Sun, Oct 28, 2012 at 11:07:23AM +, Roger Leigh wrote: > On Sun, Oct 28, 2012 at 03:00:01AM +0300, Adrian Bunk wrote: > > On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: >... > > > Maybe have an optional argument to AC_PROG_CC_STDC to select > > > the standard e.g. > > > AC_PRO

Re: Selecting a C++ standard

2012-10-28 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 08:08:13PM -0700, Russ Allbery wrote: > Adrian Bunk writes: > > On Sat, Oct 27, 2012 at 06:45:01PM -0700, Russ Allbery wrote: > > >> Almost none of the software that I work on requires a 64-bit integer type. > >> (C89 or later is also my default target for the software I w

Re: Selecting a C++ standard

2012-10-28 Thread Paul Eggert
On 10/28/2012 04:07 AM, Roger Leigh wrote: > If I want C11, I certainly won't find the C99 or C89 > fallbacks useful at all. I want it to fail there and then. I'm afraid that if you want C11, then the only reasonable implementation right now is something like this: AC_MSG_ERROR([C11 is not sup

Re: Selecting a C++ standard

2012-10-28 Thread Florian Weimer
* Andrew W. Nosenko: > ABI break by gcc-4.7.0 and 4.7.1 in c++11 mode was a bug (or > misfeature, call it as you want). Fixed in gcc-4.7.2. > From http://gcc.gnu.org/gcc-4.7/changes.html : I've seen similar issues with GCC 4.7.2. I thought that this was expected, so I didn't report it as a bug.

Re: Selecting a C++ standard

2012-10-28 Thread Andrew W. Nosenko
On Sun, Oct 28, 2012 at 5:25 PM, Florian Weimer wrote: > * Roger Leigh: > >> I would propose to add: >> >> AC_PROG_CXX_STDCXX >> AC_PROG_CXX_CXX98 >> AC_PROG_CXX_CXXTR1 [CXX98 with additional checks for TR1 headers] >> AC_PROG_CXX_CXX11 >> >> With behaviour the same as the existing C macros. > > T

Re: Selecting a C++ standard

2012-10-28 Thread Bob Friesenhahn
On Sun, 28 Oct 2012, Roger Leigh wrote: Testing for features is a problem separate from compiler mode setting. Yes, but we aren't really talking about testing strict standards conformance here. We just want the compiler put in a *specific* mode. If I want C11, I certainly won't find the C99

Re: Selecting a C++ standard

2012-10-28 Thread Florian Weimer
* Roger Leigh: > I would propose to add: > > AC_PROG_CXX_STDCXX > AC_PROG_CXX_CXX98 > AC_PROG_CXX_CXXTR1 [CXX98 with additional checks for TR1 headers] > AC_PROG_CXX_CXX11 > > With behaviour the same as the existing C macros. This would be unwise because picking the most recent compiler-supported

Re: Selecting a C++ standard

2012-10-28 Thread Roger Leigh
On Sun, Oct 28, 2012 at 03:00:01AM +0300, Adrian Bunk wrote: > On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: > > On Sat, Oct 27, 2012 at 01:55:58PM -0700, Paul Eggert wrote: > > > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > > > Is anyone working on such a thing? > > > > > > Not t

Re: Selecting a C++ standard

2012-10-27 Thread Russ Allbery
Adrian Bunk writes: > On Sat, Oct 27, 2012 at 06:45:01PM -0700, Russ Allbery wrote: >> Almost none of the software that I work on requires a 64-bit integer type. >> (C89 or later is also my default target for the software I write.) > I just tried to build remctl and lbcd with CC="gcc -pedantic-e

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 06:45:01PM -0700, Russ Allbery wrote: > Adrian Bunk writes: > > > Real "buildable by C89 or later" is rarely used, since due to lack of > > long long you have no guaranteed 64bit integer type in C89. > > Almost none of the software that I work on requires a 64-bit intege

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 06:25:02PM -0700, Harlan Stenn wrote: > Adrian Bunk writes: > > On Sat, Oct 27, 2012 at 05:59:23PM -0700, Harlan Stenn wrote: > > > Adrian, > > > > Hi Harlan, > > > > > I don't think either one of us will convince the other. > > > > > > I'm done. > > > > I'm surprised ge

Re: Selecting a C++ standard

2012-10-27 Thread Russ Allbery
Adrian Bunk writes: > Real "buildable by C89 or later" is rarely used, since due to lack of > long long you have no guaranteed 64bit integer type in C89. Almost none of the software that I work on requires a 64-bit integer type. (C89 or later is also my default target for the software I write.)

Re: Selecting a C++ standard

2012-10-27 Thread Harlan Stenn
Adrian Bunk writes: > On Sat, Oct 27, 2012 at 05:59:23PM -0700, Harlan Stenn wrote: > > Adrian, > > Hi Harlan, > > > I don't think either one of us will convince the other. > > > > I'm done. > > I'm surprised getting that as an answer to an email where I suggested a > possible solution for you

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 05:59:23PM -0700, Harlan Stenn wrote: > Adrian, Hi Harlan, > I don't think either one of us will convince the other. > > I'm done. I'm surprised getting that as an answer to an email where I suggested a possible solution for your use cases. > H cu Adrian --

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 05:07:04PM -0700, Harlan Stenn wrote: > Adrian Bunk writes: > > On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: >... > > > I originally wrote AC_PROC_CC_C99 because it was several years > > > since GCC supported C99, but there was no portable way to use > > > C9

Re: Selecting a C++ standard

2012-10-27 Thread Harlan Stenn
Adrian, I don't think either one of us will convince the other. I'm done. H ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailman/listinfo/autoconf

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 04:58:09PM -0700, Harlan Stenn wrote: > Adrian Bunk writes: > > On Sat, Oct 27, 2012 at 02:05:01PM -0700, Harlan Stenn wrote: > > > Paul Eggert writes: > > > > For C, we're deprecating the "I want version X" > > > > macros in favor of just AC_PROG_CC_STDC, which says > > > >

Re: Selecting a C++ standard

2012-10-27 Thread Harlan Stenn
Adrian Bunk writes: > On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: > > Maybe have an optional argument to AC_PROG_CC_STDC to select > > the standard e.g. > > AC_PROG_CC_STDC([C99]) > > ? I like this idea. > Latest discussion result was that there is no downside of setting the >

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 10:47:50PM +0100, Roger Leigh wrote: > On Sat, Oct 27, 2012 at 01:55:58PM -0700, Paul Eggert wrote: > > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > > Is anyone working on such a thing? > > > > Not that I know of. > > > > For C, we're deprecating the "I want version X" >

Re: Selecting a C++ standard

2012-10-27 Thread Harlan Stenn
Adrian Bunk writes: > On Sat, Oct 27, 2012 at 02:05:01PM -0700, Harlan Stenn wrote: > > Paul Eggert writes: > > > For C, we're deprecating the "I want version X" > > > macros in favor of just AC_PROG_CC_STDC, which says > > > "I want the latest version". You might want to do > > > that for C++ to,

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 02:05:01PM -0700, Harlan Stenn wrote: > Paul Eggert writes: > > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > > Is anyone working on such a thing? > > > > Not that I know of. > > > > For C, we're deprecating the "I want version X" > > macros in favor of just AC_PROG_CC_ST

Re: Selecting a C++ standard

2012-10-27 Thread Adrian Bunk
On Sat, Oct 27, 2012 at 01:55:58PM -0700, Paul Eggert wrote: > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > Is anyone working on such a thing? > > Not that I know of. > > For C, we're deprecating the "I want version X" > macros in favor of just AC_PROG_CC_STDC, which says > "I want the latest v

Re: Selecting a C++ standard

2012-10-27 Thread Roger Leigh
On Sat, Oct 27, 2012 at 01:55:58PM -0700, Paul Eggert wrote: > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > Is anyone working on such a thing? > > Not that I know of. > > For C, we're deprecating the "I want version X" > macros in favor of just AC_PROG_CC_STDC, which says > "I want the latest v

Re: Selecting a C++ standard

2012-10-27 Thread Harlan Stenn
Paul Eggert writes: > On 10/27/2012 01:38 PM, Roger Leigh wrote: > > Is anyone working on such a thing? > > Not that I know of. > > For C, we're deprecating the "I want version X" > macros in favor of just AC_PROG_CC_STDC, which says > "I want the latest version". You might want to do > that for

Re: Selecting a C++ standard

2012-10-27 Thread Paul Eggert
On 10/27/2012 01:38 PM, Roger Leigh wrote: > Is anyone working on such a thing? Not that I know of. For C, we're deprecating the "I want version X" macros in favor of just AC_PROG_CC_STDC, which says "I want the latest version". You might want to do that for C++ to, as it's more the Autoconf Way