This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/cpp preprocessoor continue on error
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Paul Hansen <paul dot hansen dot name at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 2 May 2013 10:18:18 +0100
- Subject: Re: gcc/cpp preprocessoor continue on error
- References: <CA+HcT42Gq6B+T66EGgeRxi30kRz6HVStcBQRxyyK3rTvGx_K5g at mail dot gmail dot com>
On 2 May 2013 09:13, Paul Hansen wrote:
> Hi
> Using gcc/cpp preprocessor on Mac
> $ cpp -P -E -I <dir> myfile.h
> cpp continues when it cannot find an #include file in myfile.h
>
> Using the same on Linux, it stops preprocessing when an #inlucde file
> is not found.
>
> Does anyone know if I can make cpp behave on Linux as on Mac.
> I have searched for hours but in vain...
You haven't said what versions of GCC you're using, but using my
crystal ball I suggest you're using 4.2 on your Mac (because that's
the neolithic version provided by Apple) and you're using 4.5 or newer
on GNU/Linux.
The behaviour changed in GCC 4.5, see http://gcc.gnu.org/gcc-4.5/changes.html
If youu want the same behaviour on your Mac you'll need to stop using
stone age tools :-)