[Patch] Compile error in ppl.l

Paul Laufer Paul.E.Laufer at jpl.nasa.gov
Thu May 22 17:02:24 CDT 2003


Hi,

When building wine CVS I received this m4 warning (m4 is called from
flex):

flex -Cf -d -Ppp -olex.yy.c -8 ./ppl.l
stdin:14206: m4: Warning: Excess arguments to built-in `m4_ifdef' ignored

Subsequently, gcc threw pages of warnings and errors while trying to
compile lex.yy.c. I traced the problem to line 48 in a comment of
libs/wpp/ppl.l:

 *		|  {ws} # {ws} {number} " {anytext} " {number} [{number} [{number}]]\n

The problem is m4 interprets the ']]' as the end of an argument. In
order to prevent m4 from making this mistake, I simply inserted a space
between the two brackets. One-line patch attached. I'm not familiar
enough with m4 to say if this is a proper fix, but it works.

Paul Laufer

GNU m4 1.4
flex 2.5.31
-------------- next part --------------
--- libs/wpp/ppl.l.orig	2003-05-22 14:39:38.000000000 -0700
+++ libs/wpp/ppl.l	2003-05-22 14:48:20.000000000 -0700
@@ -45,7 +45,7 @@
  *		|  {ws} # {ws} error {ws} {anytext} \n
  *		|  {ws} # {ws} warning {ws} {anytext} \n
  *		|  {ws} # {ws} line {ws} " {anytext} " {number} \n
- *		|  {ws} # {ws} {number} " {anytext} " {number} [{number} [{number}]]\n
+ *		|  {ws} # {ws} {number} " {anytext} " {number} [{number} [{number}] ]\n
  *		|  {ws} # {ws} \n
  *
  * ws		:= [ \t\r\f\v]*


More information about the wine-patches mailing list