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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [extratokens.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* Copyright (C) 2000, 2008 Free Software Foundation, Inc.  */
/* Copyright (C) 2000, 2008 Free Software Foundation, Inc.  */
 
 
/* { dg-do preprocess } */
/* { dg-do preprocess } */
/* { dg-options "-Wno-deprecated" } */
/* { dg-options "-Wno-deprecated" } */
 
 
/* Tests all directives that do not permit excess tokens at the end of
/* Tests all directives that do not permit excess tokens at the end of
   the line.  */
   the line.  */
 
 
/* Source: Neil Booth, 4 Dec 2000.  The combination of separate test
/* Source: Neil Booth, 4 Dec 2000.  The combination of separate test
   cases.  */
   cases.  */
 
 
#ifdef foo bar  /* { dg-warning "extra tokens" "tokens after #ifdef" } */
#ifdef foo bar  /* { dg-warning "extra tokens" "tokens after #ifdef" } */
#endif
#endif
 
 
#ifndef foo bar  /* { dg-warning "extra tokens" "tokens after #ifndef" } */
#ifndef foo bar  /* { dg-warning "extra tokens" "tokens after #ifndef" } */
#endif
#endif
 
 
#if 1 
#if 1 
#if 0
#if 0
#else foo       /* { dg-warning "extra tokens" "tokens after #else" } */
#else foo       /* { dg-warning "extra tokens" "tokens after #else" } */
#endif /        /* { dg-warning "extra tokens" "tokens after #endif" } */
#endif /        /* { dg-warning "extra tokens" "tokens after #endif" } */
#endif
#endif
 
 
#undef foo bar  /* { dg-warning "extra tokens" "tokens after #undef" } */
#undef foo bar  /* { dg-warning "extra tokens" "tokens after #undef" } */
 
 
#assert foo(bar) bar /* { dg-warning "extra tokens" "tokens after #assert" } */
#assert foo(bar) bar /* { dg-warning "extra tokens" "tokens after #assert" } */
 
 
#unassert foo(bar) b /* { dg-warning "extra tokens" "tokens after #unassert" } */
#unassert foo(bar) b /* { dg-warning "extra tokens" "tokens after #unassert" } */
 
 
#include "mi1c.h" bar /* { dg-warning "extra tokens" "tokens after #include" } */
#include "mi1c.h" bar /* { dg-warning "extra tokens" "tokens after #include" } */
 
 
#ident "something" bar /* { dg-warning "extra tokens" "tokens after #ident" } */
#ident "something" bar /* { dg-warning "extra tokens" "tokens after #ident" } */
 
 
# 36 "file.c" 3
# 36 "file.c" 3
 
 
/* ... but in a system header, it's acceptable.  */
/* ... but in a system header, it's acceptable.  */
#ifdef KERNEL
#ifdef KERNEL
#endif KERNEL  /* { dg-bogus "extra tokens" "bad warning" } */
#endif KERNEL  /* { dg-bogus "extra tokens" "bad warning" } */
 
 

powered by: WebSVN 2.1.0

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