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() {
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; }
> ^
>
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.
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.