aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/cpp.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2009-03-31 13:43:29 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2009-03-31 13:43:29 +0100
commit47580d22b27148144811c505b6450acd9dd8d729 (patch)
tree50fa0015aa03008a453a0de16c8f341444056875 /gcc/fortran/cpp.c
parentba4d8f9d37bf11be3a98504812447cd9bbaad708 (diff)
downloadgcc-47580d22b27148144811c505b6450acd9dd8d729.zip
gcc-47580d22b27148144811c505b6450acd9dd8d729.tar.gz
gcc-47580d22b27148144811c505b6450acd9dd8d729.tar.bz2
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
Diffstat (limited to 'gcc/fortran/cpp.c')
-rw-r--r--gcc/fortran/cpp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index fc78f98..9187bed 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -997,6 +997,9 @@ cb_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level,
case CPP_DL_NOTE:
dlevel = DK_NOTE;
break;
+ case CPP_DL_FATAL:
+ dlevel = DK_FATAL;
+ break;
default:
gcc_unreachable ();
}