]> git.ipfire.org Git - thirdparty/gcc.git/commit - libcpp/ChangeLog
re PR preprocessor/15638 (gcc should have option to treat missing headers as fatal)
authorJoseph Myers <joseph@codesourcery.com>
Tue, 31 Mar 2009 12:43:29 +0000 (13:43 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 31 Mar 2009 12:43:29 +0000 (13:43 +0100)
commit47580d22b27148144811c505b6450acd9dd8d729
tree50fa0015aa03008a453a0de16c8f341444056875
parentba4d8f9d37bf11be3a98504812447cd9bbaad708
re PR preprocessor/15638 (gcc should have option to treat missing headers as fatal)

PR preprocessor/15638
gcc:
* c-common.c (c_cpp_error): Handle CPP_DL_FATAL.

gcc/fortran:
* cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.

gcc/testsuite:
* gcc.dg/cpp/missing-header-1.c: New test.
* gcc.dg/cpp/include2.c: Only test #include <>.  Expect
"compilation terminated" message.
* gcc.dg/cpp/include2a.c: New test.  Copy of include2.c but only
test #include "".
* gcc.dg/pch/counter-2.c, gcc.dg/pch/valid-1.c,
gcc.dg/pch/valid-2.c, gcc.dg/pch/warn-1.c: Expect "compilation
terminated" message.

libcpp:
* files.c (_cpp_find_file): Call open_file_failed after diagnosing
invalid PCH.
(open_file_failed): Make error for missing file fatal.
* include/cpplib.h (CPP_DL_FATAL): Define.

From-SVN: r145341
15 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/fortran/ChangeLog
gcc/fortran/cpp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/include2.c
gcc/testsuite/gcc.dg/cpp/include2a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/cpp/missing-header-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/counter-2.c
gcc/testsuite/gcc.dg/pch/valid-1.c
gcc/testsuite/gcc.dg/pch/valid-2.c
gcc/testsuite/gcc.dg/pch/warn-1.c
libcpp/ChangeLog
libcpp/files.c
libcpp/include/cpplib.h