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
219670f1
Commit
219670f1
authored
Jul 11, 2001
by
Ben Elliston
Committed by
Ben Elliston
Jul 11, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Revert today's change -- there is a subtle bug.
From-SVN: r43935
parent
0e41fb04
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
28 deletions
+17
-28
gcc/cp/ChangeLog
+2
-0
gcc/cp/cp-tree.h
+1
-1
gcc/cp/decl.c
+6
-12
gcc/cp/parse.y
+7
-14
gcc/cp/pt.c
+1
-1
No files found.
gcc/cp/ChangeLog
View file @
219670f1
2001-07-11 Ben Elliston <bje@redhat.com>
* Revert this change -- there is a subtle bug.
PR c++/80
* decl.c (finish_enum): New "attributes" argument; pass it to
cplus_decl_attributes. Use a narrower type if the enum is packed.
...
...
gcc/cp/cp-tree.h
View file @
219670f1
...
...
@@ -3845,7 +3845,7 @@ extern tree xref_tag PARAMS ((tree, tree, int));
extern
tree
xref_tag_from_type
PARAMS
((
tree
,
tree
,
int
));
extern
void
xref_basetypes
PARAMS
((
tree
,
tree
,
tree
,
tree
));
extern
tree
start_enum
PARAMS
((
tree
));
extern
void
finish_enum
PARAMS
((
tree
,
tree
));
extern
void
finish_enum
PARAMS
((
tree
));
extern
void
build_enumerator
PARAMS
((
tree
,
tree
,
tree
));
extern
int
start_function
PARAMS
((
tree
,
tree
,
tree
,
int
));
extern
tree
finish_function
PARAMS
((
int
));
...
...
gcc/cp/decl.c
View file @
219670f1
...
...
@@ -12984,9 +12984,8 @@ start_enum (name)
ENUMTYPE is the type object and VALUES a list of name-value pairs. */
void
finish_enum
(
enumtype
,
attributes
)
finish_enum
(
enumtype
)
tree
enumtype
;
tree
attributes
;
{
tree
pair
;
tree
minnode
;
...
...
@@ -12997,8 +12996,6 @@ finish_enum (enumtype, attributes)
int
highprec
;
int
precision
;
cplus_decl_attributes
(
enumtype
,
attributes
,
NULL_TREE
);
/* We built up the VALUES in reverse order. */
TYPE_VALUES
(
enumtype
)
=
nreverse
(
TYPE_VALUES
(
enumtype
));
...
...
@@ -13077,14 +13074,11 @@ finish_enum (enumtype, attributes)
else
fixup_signed_type
(
enumtype
);
if
(
flag_short_enums
||
TYPE_PACKED
(
enumtype
)
||
(
precision
>
TYPE_PRECISION
(
integer_type_node
)))
{
/* Use the width of the narrowest normal C type which is wide
enough. */
TYPE_PRECISION
(
enumtype
)
=
TYPE_PRECISION
(
type_for_size
(
precision
,
1
));
}
if
(
flag_short_enums
||
(
precision
>
TYPE_PRECISION
(
integer_type_node
)))
/* Use the width of the narrowest normal C type which is wide
enough. */
TYPE_PRECISION
(
enumtype
)
=
TYPE_PRECISION
(
type_for_size
(
precision
,
1
));
else
TYPE_PRECISION
(
enumtype
)
=
TYPE_PRECISION
(
integer_type_node
);
...
...
gcc/cp/parse.y
View file @
219670f1
...
...
@@ -340,7 +340,7 @@ cp_parse_init ()
%type <ttype> init initlist maybeasm maybe_init defarg defarg1
%type <ttype> asm_operands nonnull_asm_operands asm_operand asm_clobbers
%type <ttype> maybe_attribute attributes attribute attribute_list attrib
%type <ttype> any_word
enum_head
%type <ttype> any_word
%type <itype> save_lineno
%type <ttype> simple_stmt simple_if
...
...
@@ -2240,29 +2240,22 @@ pending_defargs:
{ do_pending_defargs (); }
;
enum_head:
ENUM
{ $$ = NULL_TREE; }
| ENUM attributes
{ $$ = $2; }
;
structsp:
enum_head
identifier '{'
ENUM
identifier '{'
{ $<ttype>$ = current_enum_type;
current_enum_type = start_enum ($2); }
enumlist_opt '}'
maybe_attribute
enumlist_opt '}'
{ $$.t = current_enum_type;
finish_enum (current_enum_type
, chainon ($1, $7)
);
finish_enum (current_enum_type);
$$.new_type_flag = 1;
current_enum_type = $<ttype>4;
check_for_missing_semicolon ($$.t); }
|
enum_head
'{'
|
ENUM
'{'
{ $<ttype>$ = current_enum_type;
current_enum_type = start_enum (make_anon_name ()); }
enumlist_opt '}'
maybe_attribute
enumlist_opt '}'
{ $$.t = current_enum_type;
finish_enum (current_enum_type
, chainon ($1, $6)
);
finish_enum (current_enum_type);
$$.new_type_flag = 1;
current_enum_type = $<ttype>3;
check_for_missing_semicolon ($$.t); }
...
...
gcc/cp/pt.c
View file @
219670f1
...
...
@@ -10149,7 +10149,7 @@ tsubst_enum (tag, newtag, args)
build_enumerator
(
TREE_PURPOSE
(
e
),
value
,
newtag
);
}
finish_enum
(
newtag
,
NULL_TREE
);
finish_enum
(
newtag
);
DECL_SOURCE_LINE
(
TYPE_NAME
(
newtag
))
=
DECL_SOURCE_LINE
(
TYPE_NAME
(
tag
));
DECL_SOURCE_FILE
(
TYPE_NAME
(
newtag
))
=
DECL_SOURCE_FILE
(
TYPE_NAME
(
tag
));
}
...
...
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