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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pragma-push_macro-1.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* Prove that HANDLE_PRAGMA_PUSH_POP_MACRO handling works somewhat. */
2
 
3
/* { dg-do link { target *-*-mingw* } } */
4
 
5
#define TEXT1  "ABC"
6
#define TEXT2  "DEF"
7
 
8
int main()
9
{
10
  if (__builtin_strcmp (TEXT1 TEXT2, "ABCDEF") != 0)
11
    link_error ();
12
 
13
#pragma push_macro("TEXT1")
14
#undef TEXT1
15
#define TEXT1  "XYZ"
16
 
17
  if (__builtin_strcmp (TEXT1 TEXT2, "XYZDEF") != 0)
18
    link_error ();
19
 
20
#pragma pop_macro("TEXT1")
21
 
22
  if (__builtin_strcmp (TEXT1 TEXT2, "ABCDEF") != 0)
23
    link_error ();
24
 
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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