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
8694a43c
Commit
8694a43c
authored
Jan 22, 2000
by
Zack Weinberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another test for preprocessor corner cases
From-SVN: r31558
parent
4cda35d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
gcc/testsuite/gcc.dg/lineno.c
+28
-0
No files found.
gcc/testsuite/gcc.dg/lineno.c
0 → 100644
View file @
8694a43c
/* { dg-do compile } */
/* { dg-options "-Wwrite-strings" } */
/* The purpose of this test is to ensure that line numbers in diagnostics
are accurate after macros whose arguments contain newlines and are
substituted multiple times. The semicolons are on separate lines because
#line can only correct numbering on line boundaries. */
#define one(x) x
#define two(x) x x
#define four(x) two(x) two(x)
int
main
(
void
)
{
char
*
A
;
A
=
"text"
;
/* { dg-warning "discards qualifiers" "case zero" } */
A
=
one
(
"text"
"text"
)
;
/* { dg-warning "discards qualifiers" "case one" } */
A
=
two
(
"text"
"text"
)
;
/* { dg-warning "discards qualifiers" "case two" } */
A
=
four
(
"text"
"text"
)
;
/* { dg-warning "discards qualifiers" "case four" } */
return
0
;
}
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