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
dd666a87
Commit
dd666a87
authored
Jul 31, 2001
by
Neil Booth
Committed by
Neil Booth
Jul 31, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/cpp/macro8.c: New tests.
From-SVN: r44502
parent
91abf72d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/cpp/macro8.c
+29
-0
No files found.
gcc/testsuite/ChangeLog
View file @
dd666a87
2001-07-31 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* gcc.dg/cpp/macro8.c: New test.
2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/abi/vbase8-21.C: New test.
* g++.dg/abi/vbase8-21.C: New test.
...
...
gcc/testsuite/gcc.dg/cpp/macro8.c
0 → 100644
View file @
dd666a87
/* { dg-do compile } */
/* { dg-options -std=gnu89 } */
/* GCC 2.95.2 used to get the following variable argument macro
expansions wrong.
Source: Neil Booth, from PR 3852 with persmission. 31 Jul 2001. */
#define TEST_WORSE(args...) (5, ## args)
#define TEST_BAD(foo, args...) (2, (foo), ## args)
extern
void
abort
();
static
int
add
(
int
a
,
int
b
)
{
return
a
+
b
;
}
int
main
()
{
/* Would expand to a single closing parenthesis, maybe because of
the "no args requires space" brokenness. */
if
(
TEST_WORSE
()
!=
5
)
abort
();
/* The macro would expand to (0, (0) with a missing closing parenthesis. */
if
(
add
TEST_BAD
(
5
)
!=
7
)
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