[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inconsistency between g++ and gcc
From: |
Paul Pluzhnikov |
Subject: |
Re: inconsistency between g++ and gcc |
Date: |
Sun, 13 May 2007 09:12:54 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
shlomo.anglister@gmail.com writes:
> The following code compiles on g++ and not on gcc
Yes. Did you have a question?
Assuming your question was: "why does the following code compile with
'g++', but not with 'gcc'?", and further assuming that you are
using glibc (and probably compiling on Linux), the answer is: because
g++ adds -D_GNU_SOURCE by default, but gcc doesn't.
Add -D_GNU_SOURCE if you want to compile that code with 'gcc'
on Linux.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.