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
881bc7db
Commit
881bc7db
authored
Dec 03, 2000
by
Neil Booth
Committed by
Neil Booth
Dec 03, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/cpp/macro6.c: New test cases.
From-SVN: r37972
parent
8aaef6e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/cpp/macro6.c
+32
-0
No files found.
gcc/testsuite/ChangeLog
View file @
881bc7db
2000-12-03 Neil Booth <neilb@earthling.net>
* gcc.dg/cpp/macro6.c: New test cases.
2000-12-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/string-opt-9.c: New test.
...
...
gcc/testsuite/gcc.dg/cpp/macro6.c
0 → 100644
View file @
881bc7db
/* { dg-do run } */
/* Test that, when a macro expansion spills into the source file, we
expand macros we suck in from there, as the standard clearly states
they are not nested.
Submitter: Neil Booth, with minor modifications to the originals. 3
Dec 2000.
Source: PR 962 and Thomas Pornin. */
extern
void
abort
(
void
);
int
e
=
10
,
f
=
100
;
#define e(n) 4 + n
#define X e
#define f(x) x
#define h(x) x + f
int
main
()
{
if
(
X
(
X
)
!=
14
)
/* Should expand to "4 + e". */
abort
();
if
(
X
(
X
(
f
))
!=
108
)
/* Should expand to "4 + 4 + f". */
abort
();
if
(
h
(
e
)(
h
(
e
))
!=
120
)
/* Should expand to "e + e + f". */
abort
();
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