Commit 2b01d2d9 by Zack Weinberg

cpp-mi.c: Fix switches.

cpp-redef-2.c: New.

From-SVN: r32431
parent 38b24ee2
......@@ -6,10 +6,8 @@
/* We have to test two cases: C comments at the top and C++ comments
at the top. */
/*
{ dg-do preprocess }
{ dg-options "-Wp,-lang-c-c++-comments" }
*/
/* { dg-do preprocess }
{ dg-options "" } */
#include "cpp-mic.h"
#include "cpp-mic.h"
......
/* Test for redefining macros with significant differences. */
/* { dg-do preprocess }
{ dg-options "-pedantic -Wall" } */
#define mac(a, b) (a) + (b)
#define mac(a, b) (a) * (b)
#define mac(a, b) (a) * (x)
#define ro(x) foo x bar
#define ro(x, b) foo x bar
#define va(a...) a
#define va(...) __VA_ARGS__
/* { dg-warning "redefined" "redef mac" { target *-*-* } 7 }
{ dg-warning "redefined" "redef mac" { target *-*-* } 8 }
{ dg-warning "redefined" "redef ro" { target *-*-* } 11 }
{ dg-warning "redefined" "redef va" { target *-*-* } 14 }
{ dg-warning "previous" "prev def mac" { target *-*-* } 6 }
{ dg-warning "previous" "prev def mac" { target *-*-* } 7 }
{ dg-warning "previous" "prev def ro" { target *-*-* } 10 }
{ dg-warning "previous" "prev def va" { target *-*-* } 13 }
{ dg-warning "varargs" "named varargs" { target *-*-* } 13 }
{ dg-warning "varargs" "anon varargs" { target *-*-* } 14 } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment