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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pragma-diag-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wuninitialized -O2" } */
3
/* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
4
 
5
main()
6
{
7
  int a;
8
  int b;
9
  int c;
10
  int d;
11
 
12
#pragma GCC diagnostic error "-Wuninitialized"
13
  foo(a);                       /* { dg-error "uninitialized" } */
14
#pragma GCC diagnostic push
15
#pragma GCC diagnostic ignored "-Wuninitialized"
16
  foo(b);
17
#pragma GCC diagnostic pop
18
  foo(c);                       /* { dg-error "uninitialized" } */
19
#pragma GCC diagnostic pop
20
  foo(d);                       /* { dg-warning "uninitialized" } */
21
}

powered by: WebSVN 2.1.0

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