Re: Autoconf 2.69 AC_PROG_CXX accepts plain C compilers

2014-02-05 Thread Eric Blake
On 02/05/2014 02:36 PM, Peter De Wachter wrote: > On 05-02-14 21:40, Eric Blake wrote: >> Actually, in gcc's case, your proposed program is now a syntax error: >> >> $ gcc -o foo foo.c >> foo.c: In function ‘main’: >> foo.c:1:21: error: ‘new’ undeclared (first use in this function) >> int main() {

Re: Autoconf 2.69 AC_PROG_CXX accepts plain C compilers

2014-02-05 Thread Peter De Wachter
On 05-02-14 21:40, Eric Blake wrote: > Actually, in gcc's case, your proposed program is now a syntax error: > > $ gcc -o foo foo.c > foo.c: In function ‘main’: > foo.c:1:21: error: ‘new’ undeclared (first use in this function) > int main() { (void) new int; return 0; } > ^ >

Re: Autoconf 2.69 AC_PROG_CXX accepts plain C compilers

2014-02-05 Thread Eric Blake
On 02/05/2014 01:04 PM, Peter De Wachter wrote: > I was testing a C++ project of mine with older versions of GCC, and > mistakingly used the following command: > $ ./configure CXX=gcc-4.7 > > Autoconf didn't spot any problem: >> checking whether the C++ compiler works... yes > But of course gcc-4.

Autoconf 2.69 AC_PROG_CXX accepts plain C compilers

2014-02-05 Thread Peter De Wachter
I was testing a C++ project of mine with older versions of GCC, and mistakingly used the following command: $ ./configure CXX=gcc-4.7 Autoconf didn't spot any problem: > checking whether the C++ compiler works... yes But of course gcc-4.7 doesn't know how to link a C++ program, so my build failed.