* Re: ada vs identical flex
@ 2004-10-08 11:00 Paul Hilfinger
2004-10-09 0:29 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Paul Hilfinger @ 2004-10-08 11:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
> For yyrealloc, I'm finding that some cases are wrapped in #ifndef
> YY_USES_REJECT, while others are not vis:
> NBSD FC3
> declaration yes no
> definition yes no
> reference yes yes
> ada_flex_use no no
> On NetBSD, since ada_flex_use tries to refer to a function wrapped in
> #ifndef YY_USE_REJECT (i.e., #ifdef'ed out) the build barfs.
Andrew,
I think I can get rid of the yyrealloc stuff altogether. It seems that
one of the rules in ada-lex is not really used, but causes the non-use
of yyrealloc as a side-effect. If you could, would you try the following
patch with the problematic platform/flex version? Thanks.
Paul Hilfinger
Index: merge.224/gdb/ada-lex.l
--- merge.224/gdb/ada-lex.l Wed, 06 Oct 2004 02:59:24 -0700 hilfingr
+++ merge.224(w)/gdb/ada-lex.l Fri, 08 Oct 2004 03:18:25 -0700 hilfingr
@@ -154,8 +154,6 @@ static int find_dot_all (const char *);
return CHARLIT;
}
-\"{OPER}\"/{WHITE}*"(" { return processId (yytext, yyleng); }
-
<INITIAL>\" {
tempbuf_len = 0;
BEGIN IN_STRING;
@@ -926,5 +924,5 @@ yywrap(void)
typedef void (*dummy_function) ();
dummy_function ada_flex_use[] =
{
- (dummy_function) yyrealloc, (dummy_function) yyunput
+ (dummy_function) yyunput
};
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ada vs identical flex
2004-10-08 11:00 ada vs identical flex Paul Hilfinger
@ 2004-10-09 0:29 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2004-10-09 0:29 UTC (permalink / raw)
To: Paul Hilfinger; +Cc: gdb
> I think I can get rid of the yyrealloc stuff altogether. It seems that
> one of the rules in ada-lex is not really used, but causes the non-use
> of yyrealloc as a side-effect. If you could, would you try the following
> patch with the problematic platform/flex version? Thanks.
Built for me! Thanks.
Andrew
> Paul Hilfinger
>
>
> Index: merge.224/gdb/ada-lex.l
> --- merge.224/gdb/ada-lex.l Wed, 06 Oct 2004 02:59:24 -0700 hilfingr
> +++ merge.224(w)/gdb/ada-lex.l Fri, 08 Oct 2004 03:18:25 -0700 hilfingr
> @@ -154,8 +154,6 @@ static int find_dot_all (const char *);
> return CHARLIT;
> }
>
> -\"{OPER}\"/{WHITE}*"(" { return processId (yytext, yyleng); }
> -
> <INITIAL>\" {
> tempbuf_len = 0;
> BEGIN IN_STRING;
> @@ -926,5 +924,5 @@ yywrap(void)
> typedef void (*dummy_function) ();
> dummy_function ada_flex_use[] =
> {
> - (dummy_function) yyrealloc, (dummy_function) yyunput
> + (dummy_function) yyunput
> };
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ada vs identical flex
2004-10-07 23:17 Andrew Cagney
@ 2004-10-08 2:32 ` Paul Hilfinger
0 siblings, 0 replies; 4+ messages in thread
From: Paul Hilfinger @ 2004-10-08 2:32 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb
> I'm comparing the generated ada-lex.c output from FLEX 2.5.2. Yes,
> that's comparing the output from the same "identical" FLEX - one is
> found on NetBSD/PPC 1.6.2, and the other on FC3.
We'll look at it, but that's a REALLY old flex (on GDB, I never built
with anything <2.5.4, and that was from ~1997; latest rev is more like
2.5.31).
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* ada vs identical flex
@ 2004-10-07 23:17 Andrew Cagney
2004-10-08 2:32 ` Paul Hilfinger
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2004-10-07 23:17 UTC (permalink / raw)
To: gdb
I'm comparing the generated ada-lex.c output from FLEX 2.5.2. Yes,
that's comparing the output from the same "identical" FLEX - one is
found on NetBSD/PPC 1.6.2, and the other on FC3.
For yyrealloc, I'm finding that some cases are wrapped in #ifndef
YY_USES_REJECT, while others are not vis:
NBSD FC3
declaration yes no
definition yes no
reference yes yes
ada_flex_use no no
On NetBSD, since ada_flex_use tries to refer to a function wrapped in
#ifndef YY_USE_REJECT (i.e., #ifdef'ed out) the build barfs.
On the other hand on FC3, the declaration / definition are always
visible and the build succeeds.
Ideas?
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-08 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08 11:00 ada vs identical flex Paul Hilfinger
2004-10-09 0:29 ` Andrew Cagney
-- strict thread matches above, loose matches on Subject: below --
2004-10-07 23:17 Andrew Cagney
2004-10-08 2:32 ` Paul Hilfinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).