Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/cpp/defined-Wextra-Wno-expansion-to-defined.c @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Copyright (C) 2000 Free Software Foundation, Inc. */ /* { dg-do preprocess } */ /* { dg-options "-Wextra -Wno-expansion-to-defined" } */ /* Use of defined in different contexts. */ /* Source: Neil Booth, 29 Oct 2000, Zack Weinberg 11 Dec 2000. */ #define Z #define bad0 defined Z #if !bad0 /* { dg-bogus "may not be portable" } */ #error Z is defined #endif #define bad1 defined #if !bad1 Z /* { dg-bogus "may not be portable" } */ #error Z is defined #endif #if !bad1 (Z) /* { dg-bogus "may not be portable" } */ #error Z is defined #endif #define bad2 defined (Z #if !bad2) /* { dg-bogus "may not be portable" } */ #error Z is defined #endif