diff options
author | cgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-19 06:15:21 +0000 |
---|---|---|
committer | cgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-19 06:15:21 +0000 |
commit | c25f268925f51315b4dea284813362bd44a7ffcd (patch) | |
tree | f813fae3ff4b5335403a4b5b6455bf737c81f085 /gcc/testsuite/gcc.dg/cpp | |
parent | 13dde709ce3bd835338736299be9d8ded9e4b2b2 (diff) | |
download | gcc-c25f268925f51315b4dea284813362bd44a7ffcd.tar.gz |
[libcpp/ChangeLog]
2009-09-18 Chris Demetriou <cgd@google.com>
PR preprocessor/28435:
* include/cpplib.h (struct cpp_options): Add new member
deps.need_preprocessor_output.
* files.c (open_file_failed): If preprocessor output is needed
always report an error.
[gcc/ChangeLog]
2009-09-19 Chris Demetriou <cgd@google.com>
PR preprocessor/28435:
* c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
to cpplib that the preprocessor output is needed.
[gcc/testsuite/ChangeLog]
2009-09-19 Chris Demetriou <cgd@google.com>
PR preprocessor/28435:
* gcc.dg/cpp/missing-header-MD.c: New test.
* gcc.dg/cpp/missing-header-MMD.c: New test.
* gcc.dg/cpp/missing-sysheader-MD.c: New test.
* gcc.dg/cpp/missing-sysheader-MMD.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151879 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/missing-header-MD.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/missing-header-MMD.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/missing-sysheader-MD.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/missing-sysheader-MMD.c | 6 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/missing-header-MD.c b/gcc/testsuite/gcc.dg/cpp/missing-header-MD.c new file mode 100644 index 00000000000..198352537ee --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/missing-header-MD.c @@ -0,0 +1,6 @@ +/* Test that missing user headers are fatal errors with -MD. */ +/* { dg-do compile } */ +/* { dg-options "-MD" } */ + +#include "nonexistent.h" /* { dg-error "nonexistent.h" } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/missing-header-MMD.c b/gcc/testsuite/gcc.dg/cpp/missing-header-MMD.c new file mode 100644 index 00000000000..aff8d395596 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/missing-header-MMD.c @@ -0,0 +1,6 @@ +/* Test that missing user headers are fatal errors with -MMD. */ +/* { dg-do compile } */ +/* { dg-options "-MMD" } */ + +#include "nonexistent.h" /* { dg-error "nonexistent.h" } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MD.c b/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MD.c new file mode 100644 index 00000000000..bf255a4994d --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MD.c @@ -0,0 +1,6 @@ +/* Test that missing system headers are fatal errors with -MD. */ +/* { dg-do compile } */ +/* { dg-options "-MD" } */ + +#include <nonexistent.h> /* { dg-error "nonexistent.h" } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MMD.c b/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MMD.c new file mode 100644 index 00000000000..10cd870ad54 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/missing-sysheader-MMD.c @@ -0,0 +1,6 @@ +/* Test that missing system headers are fatal errors with -MMD. */ +/* { dg-do compile } */ +/* { dg-options "-MMD" } */ + +#include <nonexistent.h> /* { dg-error "nonexistent.h" } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ |