Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
f47e4084
Commit
f47e4084
authored
Jul 25, 2000
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Jul 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/cpp/tr-warn3.c: New test.
From-SVN: r35255
parent
8b27e9ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/cpp/tr-warn3.c
+61
-0
No files found.
gcc/testsuite/ChangeLog
View file @
f47e4084
2000-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/cpp/tr-warn3.c: New test.
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.ext/implicit1.C: Remove.
* g++.old-deja/g++.ext/implicit1.C: Remove.
...
...
gcc/testsuite/gcc.dg/cpp/tr-warn3.c
0 → 100644
View file @
f47e4084
/* Test for warnings about nontraditional directives inside the unused
clauses of #if statements. Extensions do _not_ receive pedantic
warnings inside unused clauses because they are often hidden this
way on purpose. However they do still require indentation for K&R. */
/* { dg-do preprocess } */
/* { dg-options "-pedantic -Wtraditional -fno-show-column" } */
#if 1
/* Block 1: K+R directives should have the # indented to warn. */
#define foo bar
/* { dg-bogus "indented" "^#kandr" } */
# define foo bar
/* { dg-bogus "indented" "^# kandr" } */
#define foo bar
/* { dg-warning "indented" "^ #kandr" } */
# define foo bar
/* { dg-warning "indented" "^ # kandr" } */
/* Block 2: C89 directives should not have the # indented to warn. */
#pragma whatever
/* { dg-warning "indented" "^#c89" } */
# pragma whatever
/* { dg-warning "indented" "^# c89" } */
#pragma whatever
/* { dg-bogus "indented" "^ #c89" } */
# pragma whatever
/* { dg-bogus "indented" "^ # c89" } */
/* Block 3: Extensions should not have the # indented to warn, _and_
they should get a -pedantic warning. */
#assert foo(bar)
/* { dg-warning "indented" "^#ext" } */
# assert bar(baz)
/* { dg-warning "indented" "^# ext" } */
#assert baz(quux)
/* { dg-bogus "indented" "^ #ext" } */
# assert quux(weeble)
/* { dg-bogus "indented" "^ # ext" } */
#else
/* Block 1: K+R directives should have the # indented to warn. */
#undef foo bar
/* { dg-bogus "indented" "^#kandr" } */
# undef foo bar
/* { dg-bogus "indented" "^# kandr" } */
#undef foo bar
/* { dg-warning "indented" "^ #kandr" } */
# undef foo bar
/* { dg-warning "indented" "^ # kandr" } */
/* Block 2: C89 directives should not have the # indented to warn. */
#error whatever
/* { dg-warning "indented" "^#c89" } */
# error whatever
/* { dg-warning "indented" "^# c89" } */
#error whatever
/* { dg-bogus "indented" "^ #c89" } */
# error whatever
/* { dg-bogus "indented" "^ # c89" } */
/* Block 3: Extensions should not have the # indented to warn, and
they should _not_ get a -pedantic warning. */
#unassert foo(bar)
/* { dg-warning "indented" "^#ext" } */
# unassert bar(baz)
/* { dg-warning "indented" "^# ext" } */
#unassert baz(quux)
/* { dg-bogus "indented" "^ #ext" } */
# unassert quux(weeble)
/* { dg-bogus "indented" "^ # ext" } */
#endif
/* { dg-warning "ISO C does not" "extension warning" { target *-*-* } 27 } */
/* { dg-warning "ISO C does not" "extension warning" { target *-*-* } 28 } */
/* { dg-warning "ISO C does not" "extension warning" { target *-*-* } 29 } */
/* { dg-warning "ISO C does not" "extension warning" { target *-*-* } 30 } */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment