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
ff86beb7
Commit
ff86beb7
authored
Jun 22, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call cplus_decl_attributes with prefix_attributes where appropriate.
(primary, handler_seq): Set it. From-SVN: r10039
parent
f714b8e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
14 deletions
+38
-14
gcc/cp/parse.y
+38
-14
No files found.
gcc/cp/parse.y
View file @
ff86beb7
/* YACC parser for C++ syntax.
/* YACC parser for C++ syntax.
Copyright (C) 1988, 1989, 1993, 1995 Free Software Foundation, Inc.
Copyright (C) 1988, 1989, 1993, 199
4, 199
5 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -531,6 +531,7 @@ template_def:
...
@@ -531,6 +531,7 @@ template_def:
{
{
int def = ($4 != ';');
int def = ($4 != ';');
tree d = start_decl ($<ttype>3, $<ttype>2, 0, NULL_TREE);
tree d = start_decl ($<ttype>3, $<ttype>2, 0, NULL_TREE);
cplus_decl_attributes (d, NULL_TREE, prefix_attributes);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
end_template_decl ($1, d, 0, def);
end_template_decl ($1, d, 0, def);
if (def)
if (def)
...
@@ -557,6 +558,7 @@ datadef:
...
@@ -557,6 +558,7 @@ datadef:
| declmods notype_declarator ';'
| declmods notype_declarator ';'
{ tree d;
{ tree d;
d = start_decl ($<ttype>2, $<ttype>$, 0, NULL_TREE);
d = start_decl ($<ttype>2, $<ttype>$, 0, NULL_TREE);
cplus_decl_attributes (d, NULL_TREE, prefix_attributes);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
}
}
| typed_declspecs initdecls ';'
| typed_declspecs initdecls ';'
...
@@ -567,6 +569,7 @@ datadef:
...
@@ -567,6 +569,7 @@ datadef:
| typed_declspecs declarator ';'
| typed_declspecs declarator ';'
{ tree d;
{ tree d;
d = start_decl ($<ttype>2, $<ttype>$, 0, NULL_TREE);
d = start_decl ($<ttype>2, $<ttype>$, 0, NULL_TREE);
cplus_decl_attributes (d, NULL_TREE, prefix_attributes);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
note_list_got_semicolon ($<ttype>$);
note_list_got_semicolon ($<ttype>$);
}
}
...
@@ -1474,18 +1477,34 @@ primary:
...
@@ -1474,18 +1477,34 @@ primary:
}
}
}
}
| functional_cast
| functional_cast
| DYNAMIC_CAST '<' type_id '>' '(' expr ')'
| DYNAMIC_CAST '<'
{ tree type = groktypename ($3);
{ dont_allow_type_definitions = "inside dynamic_cast"; }
$$ = build_dynamic_cast (type, $6); }
type_id '>'
| STATIC_CAST '<' type_id '>' '(' expr ')'
{ dont_allow_type_definitions = 0; }
{ tree type = groktypename ($3);
'(' expr ')'
$$ = build_static_cast (type, $6); }
{ tree type = groktypename ($4);
| REINTERPRET_CAST '<' type_id '>' '(' expr ')'
$$ = build_dynamic_cast (type, $8); }
{ tree type = groktypename ($3);
| STATIC_CAST '<'
$$ = build_reinterpret_cast (type, $6); }
{ dont_allow_type_definitions = "inside static_cast"; }
| CONST_CAST '<' type_id '>' '(' expr ')'
type_id '>'
{ tree type = groktypename ($3);
{ dont_allow_type_definitions = 0; }
$$ = build_const_cast (type, $6); }
'(' expr ')'
{ tree type = groktypename ($4);
$$ = build_static_cast (type, $8); }
| REINTERPRET_CAST '<'
{ dont_allow_type_definitions = "inside reinterpret_cast"; }
type_id '>'
{ dont_allow_type_definitions = 0; }
'(' expr ')'
{ tree type = groktypename ($4);
$$ = build_reinterpret_cast (type, $8); }
| CONST_CAST '<'
{ dont_allow_type_definitions = "inside const_cast"; }
type_id '>'
{ dont_allow_type_definitions = 0; }
'(' expr ')'
{ tree type = groktypename ($4);
$$ = build_const_cast (type, $8); }
| TYPEID '(' expr ')'
| TYPEID '(' expr ')'
{ $$ = build_typeid ($3); }
{ $$ = build_typeid ($3); }
| TYPEID '(' type_id ')'
| TYPEID '(' type_id ')'
...
@@ -1737,6 +1756,7 @@ decl:
...
@@ -1737,6 +1756,7 @@ decl:
{ tree d = $1;
{ tree d = $1;
int yes = suspend_momentary ();
int yes = suspend_momentary ();
d = start_decl ($2, d, 0, NULL_TREE);
d = start_decl ($2, d, 0, NULL_TREE);
cplus_decl_attributes (d, NULL_TREE, prefix_attributes);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0, 0);
resume_momentary (yes);
resume_momentary (yes);
note_list_got_semicolon ($1);
note_list_got_semicolon ($1);
...
@@ -3427,7 +3447,11 @@ try_block:
...
@@ -3427,7 +3447,11 @@ try_block:
handler_seq:
handler_seq:
/* empty */
/* empty */
| handler_seq CATCH .pushlevel handler_args compstmt
| handler_seq CATCH .pushlevel
{ dont_allow_type_definitions = "inside exception declarations"; }
handler_args
{ dont_allow_type_definitions = 0; }
compstmt
{ expand_end_catch_block (); }
{ expand_end_catch_block (); }
.poplevel
.poplevel
;
;
...
...
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