bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: ld rejects C style comments


From: Alan Modra
Subject: Re: BUG: ld rejects C style comments
Date: Mon, 5 May 2003 15:56:24 +0930
User-agent: Mutt/1.4i

On Sat, May 03, 2003 at 03:38:52PM -0300, Flavio Ribeiro wrote:
> ld's info page says that VERSION scripts may have C style comments 
> delimited by '/*' and '*/', but ld fails with errors such as this:
[snip]

It's probably easier to actually fix the lexer than to fix ld's
documentation, and I don't see any reason to not support comments..

        * ldlex.l: Accept C style comments in version scripts.

Applying mainline.

Index: ld/ldlex.l
===================================================================
RCS file: /cvs/src/src/ld/ldlex.l,v
retrieving revision 1.18
diff -u -p -r1.18 ldlex.l
--- ld/ldlex.l  15 Apr 2003 14:50:29 -0000      1.18
+++ ld/ldlex.l  5 May 2003 06:24:15 -0000
@@ -144,7 +144,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^]([*?
        }
     }
 
-<BOTH,SCRIPT,EXPRESSION>"/*"   { comment(); }
+<BOTH,SCRIPT,EXPRESSION,VERS_START,VERS_NODE,VERS_SCRIPT>"/*"  { comment(); }
 
 
 <DEFSYMEXP>"-"                  { RTOKEN('-');}

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]