mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-13 15:34:48 +08:00
* gengtype-lex.l: Recognize typedef of functions without PARAMS macro.
From-SVN: r72106
This commit is contained in:
parent
d72c6c58a9
commit
790ca6641b
@ -1,3 +1,7 @@
|
||||
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>
|
||||
|
||||
* config/v850/v850-c.c, config/v850/v850-protos.h, config/v850/v850.c:
|
||||
|
@ -132,6 +132,23 @@ ITYPE {IWORD}({WS}{IWORD})*
|
||||
do_typedef (xmemdup (namestart, namelen, namelen+1), t, &lexer_line);
|
||||
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 {
|
||||
char *namestart;
|
||||
size_t namelen;
|
||||
@ -148,6 +165,22 @@ ITYPE {IWORD}({WS}{IWORD})*
|
||||
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" {
|
||||
char *tagstart;
|
||||
size_t taglen;
|
||||
|
Loading…
Reference in New Issue
Block a user