comparison gcc/testsuite/gcc.c-torture/compile/pr84195.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-options "-Wdeprecated-declarations" } */
2
3 /* Check that MSG is printed without the escape characters being interpreted.
4 Especially the newlines.
5
6 Note - gcc's behaviour is inconsistent in this regard as #error and
7 #warning will also display control characters as escape sequences,
8 whereas #pragma GCC error and #pragma GCC warning will perform the
9 control operations of the control characters. */
10
11 #define MSG "foo\n\t\rbar"
12
13 int f (int i __attribute__ ((deprecated (MSG))))
14 {
15 return 0 ? i : 0; /* { dg-warning "'i' is deprecated: foo.n.t.rbar" } */
16 }
17