OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [pragma-diagnostic-2.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/*
2
  { dg-options "-Wuninitialized -ftrack-macro-expansion=2" }
3
  { dg-do compile }
4
*/
5
 
6
void f (unsigned);
7
 
8
#define CODE_WITH_WARNING \
9
  int a; /* { dg-message "expansion|declared here" } */  \
10
  f (a)  /* { dg-message "expansion" } */
11
 
12
#pragma GCC diagnostic ignored "-Wuninitialized"
13
 
14
void
15
g (void)
16
{
17
  CODE_WITH_WARNING;
18
}
19
 
20
#pragma GCC diagnostic push
21
 
22
#pragma GCC diagnostic error "-Wuninitialized"
23
 
24
void
25
h (void)
26
{
27
  CODE_WITH_WARNING;            /* { dg-message "expanded" } */
28
}
29
 
30
/*
31
  { dg-message "some warnings being treated as errors" "" {target *-*-*} 0 }
32
*/
33
 
34
/* { dg-error "uninitialized" "" { target *-*-* } { 10 } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.