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
790ca664
Commit
790ca664
authored
Oct 05, 2003
by
Kelley Cook
Committed by
R. Kelley Cook
Oct 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gengtype-lex.l: Recognize typedef of functions without PARAMS macro.
From-SVN: r72106
parent
d72c6c58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
gcc/ChangeLog
+4
-0
gcc/gengtype-lex.l
+33
-0
No files found.
gcc/ChangeLog
View file @
790ca664
2003-10-04 Kelley Cook <kelleycook@wideopenwest.com>
* gengtype-lex.l: Recognize typedef of functions without PARAMS macro.
2003-10-04 Nathanael Nerode <neroden@gcc.gnu.org>
2003-10-04 Nathanael Nerode <neroden@gcc.gnu.org>
* config/v850/v850-c.c, config/v850/v850-protos.h, config/v850/v850.c:
* config/v850/v850-c.c, config/v850/v850-protos.h, config/v850/v850.c:
...
...
gcc/gengtype-lex.l
View file @
790ca664
...
@@ -132,6 +132,23 @@ ITYPE {IWORD}({WS}{IWORD})*
...
@@ -132,6 +132,23 @@ ITYPE {IWORD}({WS}{IWORD})*
do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
update_lineno (yytext, yyleng);
update_lineno (yytext, yyleng);
}
}
[^[:alnum:]_]typedef{WS}{ID}{WS}{ID}{WS}"(" {
char *namestart;
size_t namelen;
struct type *t;
for (namestart = yytext + yyleng - 2; ISSPACE (*namestart); namestart--)
;
for (namelen = 1; !ISSPACE (namestart[-namelen]); namelen++)
;
namestart -= namelen - 1;
t = create_scalar_type ("function type", sizeof ("function type")-1);
do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
update_lineno (yytext, yyleng);
}
[^[:alnum:]_]typedef{WS}{ID}{WS}?"("{WS}?"*"{WS}?{ID}{WS}?")"{WS}?PARAMS {
[^[:alnum:]_]typedef{WS}{ID}{WS}?"("{WS}?"*"{WS}?{ID}{WS}?")"{WS}?PARAMS {
char *namestart;
char *namestart;
size_t namelen;
size_t namelen;
...
@@ -148,6 +165,22 @@ ITYPE {IWORD}({WS}{IWORD})*
...
@@ -148,6 +165,22 @@ ITYPE {IWORD}({WS}{IWORD})*
update_lineno (yytext, yyleng);
update_lineno (yytext, yyleng);
}
}
[^[:alnum:]_]typedef{WS}{ID}{WS}?"("{WS}?"*"{WS}?{ID}{WS}?")"{WS}?"(" {
char *namestart;
size_t namelen;
struct type *t;
for (namestart = yytext + yyleng - 2; !ISIDNUM (*namestart); namestart--)
;
for (namelen = 1; ISIDNUM (namestart[-namelen]); namelen++)
;
namestart -= namelen - 1;
t = create_scalar_type ("function type", sizeof ("function type")-1);
do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
update_lineno (yytext, yyleng);
}
[^[:alnum:]_](typedef{WS})?(struct|union){WS}{ID}{WS}/"GTY" {
[^[:alnum:]_](typedef{WS})?(struct|union){WS}{ID}{WS}/"GTY" {
char *tagstart;
char *tagstart;
size_t taglen;
size_t taglen;
...
...
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