[PATCH] avoid dropping one '|' when using parallel doublebar '||'

Jie Zhang zhangjie@magima.com.cn
Wed Feb 19 02:52:00 GMT 2003


This patch solve a problem when using parallel doublebar '||'. The old
source is:

...
case LEX_IS_DOUBLEBAR_1ST:
   ch2 = GET ();
   if (ch2 != '|')
     {
       UNGET (ch2);
       goto de_fault;
     }
   /* Reset back to state 1 and pretend that we are parsing a line from
      just after the first white space.  */
   state = 1;
   PUT ('|');
   PUT ('|');
   break;
...

If after the first "PUT ('|')", the output buffer is full, then the second
"PUT ('|')" will NOT be executed and the second '|' will be dropped. See the
definition of macro "PUT (pch)".

This problem occurs occasionally. We solved it by putting one '|' in one
state.

- Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doublebar-patch.diff
Type: application/octet-stream
Size: 1517 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030219/066714d0/attachment.obj>


More information about the Binutils mailing list