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-1.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" }
3
  { dg-do compile }
4
*/
5
 
6
void f (unsigned);
7
 
8
#define CODE_WITH_WARNING \
9
  int a;                  \
10
  f (a)
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-error "uninitialized" } */
28
}
29
 
30
/*
31
  { dg-message "some warnings being treated as errors" "" {target *-*-*} 0 }
32
*/

powered by: WebSVN 2.1.0

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