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
c4e8876e
Commit
c4e8876e
authored
Feb 12, 1998
by
Benjamin Kosnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
�
testcase for g++/14837 From-SVN: r17882
parent
2df06032
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C
+51
-0
No files found.
gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C
0 → 100644
View file @
c4e8876e
// Build don't link:
//980205 bkoz
//7.1.3 the typedef specifier
//p1
typedef
int
MILES
,
*
KLICKSP
;
MILES
distance
;
extern
KLICKSP
metricp
;
//p2--can redefine to same type
typedef
struct
s
{
/* ... */
}
s
;
typedef
int
I
;
typedef
int
I
;
typedef
I
I
;
//p3--cannot redefine to a different type in a given scope
class
complex2
{
/* ... */
};
// ERROR - .*
typedef
int
complex2
;
// ERROR - .*
typedef
int
complex3
;
// ERROR - .*
class
complex3
{
/* ... */
};
// ERROR - .*
//p4
/*
4 A typedef-name that names a class is a class-name (_class.name_). If
a typedef-name is used
1) following the class-key in an elaborated-type-specifier
2) or in the class-head of a class declaration
3) or is used as the identifier in the declarator for a
constructor or destructor declaration
the program is ill-formed. [Example:
*/
struct
S
{
S
();
~
S
();
};
typedef
struct
S
T
;
S
a
=
T
();
// OK
struct
T
*
p
;
// error
//case01
typedef
bool
short
;
// ERROR - .*
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