diff options
author | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-29 00:11:36 +0000 |
---|---|---|
committer | echristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-29 00:11:36 +0000 |
commit | c195b9ad216b62786d336c50d2ab80aa00f98e2b (patch) | |
tree | 0ce5f3b906445d51cf61c96c360c5c7ffdf70cd9 /gcc/testsuite/gcc.dg/inline3.c | |
parent | bdd3e9ae8fe53f3f0863dbe0eecc8bff7ac7b055 (diff) | |
download | gcc-c195b9ad216b62786d336c50d2ab80aa00f98e2b.tar.gz |
2005-06-28 Eric Christopher <echristo@redhat.com>
PR c/22052
PR c/21975
* c-decl.c (diagnose_mismatched_decls): Define DECL_EXTERN_INLINE.
Use. Fix detection of invalid extern inline redefinition.
2005-06-28 Eric Christopher <echristo@redhat.com>
PR c/22052
PR c/21975
* gcc.dg/inline1.c: New test.
* gcc.dg/inline2.c: Ditto.
* gcc.dg/inline3.c: Ditto.
* gcc.dg/inline4.c: Ditto.
* gcc.dg/inline5.c: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101400 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/inline3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/inline3.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/inline3.c b/gcc/testsuite/gcc.dg/inline3.c new file mode 100644 index 00000000000..bc755e32ed2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/inline3.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -std=gnu89" } */ +/* This testcase should fail since we're redefining foo in the same + translation unit. */ +extern inline int foo(void) { return 0; } +inline int foo (void) { return 1; } /* { dg-error "previous definition of" } */ +int foo (void) { return 2; } /* { dg-error "error: redefinition of" } */ |