Ido Wolf
Ido Wolf

Reputation: 181

GCC terminates operation on fatal error

The Linux server at my college runs gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1), configuration below.

As an exercise I'm trying to run and get the warnings and output for a buggy program. The first error is that the program starts with

#include <stdio> 

rather than

#include <stdio.h>

.

On the server, the compiler shows said first error, and then proceeds to show the rest of the errors and warnings. On my local VM however, it only shows this first error as a "fatal error", and then terminates operation.

I would like to configure my local GCC so that it behaves the same as the remote GCC.

I'm compiling my code on both machines using gcc -Wall -o filename filename.c.

My local VM GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

Remote GCC configuration:

Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux

Local GCC configuration:

Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Upvotes: 1

Views: 446

Answers (1)

yugr
yugr

Reputation: 21888

Aborting on missing headers has been deliberately enabled some time ago (see BZ 15638) as it's believed that most following errors will be caused by missing declarations and so pretty much useless. There is no option to revert to old behavior.

Upvotes: 1

Related Questions