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
46d18cc6
Commit
46d18cc6
authored
26 years ago
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
From-SVN: r23646
parent
f99f88e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C
+16
-6
No files found.
gcc/testsuite/g++.old-deja/g++.bugs/900322_01.C
View file @
46d18cc6
// g++ 1.37.1 bug 900322_01
// ** Old, obsolete commentary:
// **************************************************************************
// The ANSI C standard, in section 3.1.2.5 (first paragraph) differentiates
// types into three disjoint sets, i.e object types, function types, and
// incomplete types.
...
...
@@ -19,6 +21,14 @@
// g++ fails to flag all of the indicated statements with errors (even when
// the -pedantic option is used).
// **************************************************************************
// The above commentary is wrong. (jason 1998/11/13)
// In fact, the lines marked OK are well-formed; the prohibition is only
// against forming array types with multiple unknown bounds. This prohibition
// is found in 8.3.4 [dcl.array].
// It is also ill-formed to create an object of incomplete type.
// keywords: incomplete types, arrays, element types
...
...
@@ -36,16 +46,16 @@ typedef int_one_d_type int_two_d_type[];// ERROR - invalid declaration
struct
s
;
extern
struct
s
extern_s_array
[
10
];
//
ERROR - , XFAIL *-*-*
struct
s
tenative_s_array
[
10
];
// ERROR -
caught by g++
static
struct
s
static_s_array
[
10
];
// ERROR -
caught by g++
extern
struct
s
extern_s_array
[
10
];
//
OK
struct
s
tenative_s_array
[
10
];
// ERROR -
object with incomplete type
static
struct
s
static_s_array
[
10
];
// ERROR -
object with incomplete type
struct
s
(
*
pointer_to_s_array
)
[];
//
ERROR - , XFAIL *-*-*
struct
s
(
*
pointer_to_s_array
)
[];
//
OK
void
function_1
(
struct
s
arg
[])
{
//
ERROR - , XFAIL *-*-*
void
function_1
(
struct
s
arg
[])
{
//
OK
}
typedef
struct
s
s_type
;
typedef
s_type
s_one_d_type
[
10
];
//
ERROR - , XFAIL *-*-*
typedef
s_type
s_one_d_type
[
10
];
//
OK
int
main
()
{
return
0
;
}
This diff is collapsed.
Click to expand it.
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