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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [extratokens.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2000 Free Software Foundation, Inc.  */
2
 
3
/* { dg-do preprocess } */
4
/* { dg-options "-fno-show-column" } */
5
 
6
/* Tests all directives that do not permit excess tokens at the end of
7
   the line.  */
8
 
9
/* Source: Neil Booth, 4 Dec 2000.  The combination of separate test
10
   cases.  */
11
 
12
#ifdef foo bar  /* { dg-error "extra tokens" "tokens after #ifdef" } */
13
#endif
14
 
15
#ifndef foo bar  /* { dg-error "extra tokens" "tokens after #ifndef" } */
16
#endif
17
 
18
#if 1 
19
#if 0
20
#else foo       /* { dg-warning "extra tokens" "tokens after #else" } */
21
#endif /        /* { dg-warning "extra tokens" "tokens after #endif" } */
22
#endif
23
 
24
#undef foo bar  /* { dg-error "extra tokens" "tokens after #undef" } */
25
 
26
#assert foo(bar) bar /* { dg-error "extra tokens" "tokens after #assert" } */
27
 
28
#unassert foo(bar) b /* { dg-error "extra tokens" "tokens after #unassert" } */
29
 
30
#include "mi1c.h" bar /* { dg-error "extra tokens" "tokens after #include" } */
31
 
32
#ident "something" bar /* { dg-error "extra tokens" "tokens after #ident" } */
33
 
34
# 36 "file.c" 3
35
 
36
/* ... but in a system header, it's acceptable.  */
37
#ifdef KERNEL
38
#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.