* [patch] prevent build warnings from arlex.l and syslex.l
@ 2011-04-05 18:11 John Marino
2011-04-06 5:16 ` Alan Modra
0 siblings, 1 reply; 5+ messages in thread
From: John Marino @ 2011-04-05 18:11 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
Last week I patch I submitted that prevented ld/ldlex.l from emitting a
warning during the build process was committed:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ldlex.l.diff?cvsroot=src&r1=1.50&r2=1.51
It turns out that binutils/arlex.l and binutils/syslex.l have exactly
the same problem. The attached patch will silence these warnings on
those files too.
Regards,
John
[-- Attachment #2: xxlex.l.patch --]
[-- Type: text/plain, Size: 558 bytes --]
diff --git a/binutils/arlex.l b/binutils/arlex.l
index aeac391..36e99ac 100644
--- a/binutils/arlex.l
+++ b/binutils/arlex.l
@@ -31,7 +31,9 @@
#include "libiberty.h"
#include "arparse.h"
+#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT
+#endif
extern int yylex (void);
diff --git a/binutils/syslex.l b/binutils/syslex.l
index 7e3f298..759462c 100644
--- a/binutils/syslex.l
+++ b/binutils/syslex.l
@@ -30,7 +30,9 @@
#endif
#include "sysinfo.h"
+#ifndef YY_NO_UNPUT
#define YY_NO_UNPUT
+#endif
#ifndef yywrap
static int yywrap (void) { return 1; }
[-- Attachment #3: 2011_04_05_changelog.binutils.txt --]
[-- Type: text/plain, Size: 119 bytes --]
2011-04-05 John Marino <binutils@marino.st>
* arlex.l: prevent redefinition of YY_NO_UNPUT.
* syslex.l: likewise.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] prevent build warnings from arlex.l and syslex.l
2011-04-05 18:11 [patch] prevent build warnings from arlex.l and syslex.l John Marino
@ 2011-04-06 5:16 ` Alan Modra
2011-04-06 5:22 ` John Marino
0 siblings, 1 reply; 5+ messages in thread
From: Alan Modra @ 2011-04-06 5:16 UTC (permalink / raw)
To: John Marino; +Cc: binutils
On Tue, Apr 05, 2011 at 08:11:44PM +0200, John Marino wrote:
> +#ifndef YY_NO_UNPUT
> #define YY_NO_UNPUT
> +#endif
Is there any reason to not use this instead?
#undef YY_NO_UNPUT
#define YY_NO_UNPUT
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] prevent build warnings from arlex.l and syslex.l
2011-04-06 5:16 ` Alan Modra
@ 2011-04-06 5:22 ` John Marino
2011-04-08 6:36 ` John Marino
0 siblings, 1 reply; 5+ messages in thread
From: John Marino @ 2011-04-06 5:22 UTC (permalink / raw)
To: John Marino, binutils
Alan Modra wrote:
> On Tue, Apr 05, 2011 at 08:11:44PM +0200, John Marino wrote:
>> +#ifndef YY_NO_UNPUT
>> #define YY_NO_UNPUT
>> +#endif
>
> Is there any reason to not use this instead?
> #undef YY_NO_UNPUT
> #define YY_NO_UNPUT
>
It's supposed to be defined by the first line "%option nounput"
If anything, the line "#undef YY_NO_UNPUT" should be deleted, however
Nick wanted to stick with this method in case someone has a broken
implementation of lex.
He's the one that committed the ldlex.l change on March 28.
Regards,
John
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] prevent build warnings from arlex.l and syslex.l
2011-04-06 5:22 ` John Marino
@ 2011-04-08 6:36 ` John Marino
2011-04-08 15:29 ` Nick Clifton
0 siblings, 1 reply; 5+ messages in thread
From: John Marino @ 2011-04-08 6:36 UTC (permalink / raw)
To: binutils
John Marino wrote:
> Alan Modra wrote:
>> On Tue, Apr 05, 2011 at 08:11:44PM +0200, John Marino wrote:
>>> +#ifndef YY_NO_UNPUT
>>> #define YY_NO_UNPUT
>>> +#endif
>>
>> Is there any reason to not use this instead?
>> #undef YY_NO_UNPUT
>> #define YY_NO_UNPUT
>>
>
>
> It's supposed to be defined by the first line "%option nounput"
> If anything, the line "#undef YY_NO_UNPUT" should be deleted, however
> Nick wanted to stick with this method in case someone has a broken
> implementation of lex.
>
> He's the one that committed the ldlex.l change on March 28.
>
> Regards,
>
> John
Is there anything holding this patch back from being committed? I just
don't want it fall between the cracks.
Thanks,
John
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-08 15:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 18:11 [patch] prevent build warnings from arlex.l and syslex.l John Marino
2011-04-06 5:16 ` Alan Modra
2011-04-06 5:22 ` John Marino
2011-04-08 6:36 ` John Marino
2011-04-08 15:29 ` Nick Clifton
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).