This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc/cpp preprocessoor continue on error


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 :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]