Bug Report no. 35

attlogo6876_dk.gif (2280 bytes)

sideHome.gif (2321 bytes) sideDownload.gif (2450 bytes) sideDocumentation.gif (2512 bytes) sideFAQ.gif (2344 bytes) sidePatch.gif (2543 bytes) sideSearch.gif (2403 bytes)

Reported By

Gary  Duzan

Date

16 Oct 1998

Platforms

AIX and HPUX

Version

omniORB 2.6.0 (Fixed in 2.6.1)

Description

When the IDL is such that the output from the preprocessor contains the directive #line <line no>, the rest of the IDL file got parsed wrongly.

Patch

This patch to omniidl2 fixes the problem (and in a separate text file):

 

*** omniORB_2.6.0/src/tool/omniidl2/fe/lex.yy.cc  Thu Oct  8 12:17:00 1998
--- omniORB_2.6.0_NEW/src/tool/omniidl2/fe/lex.yy.cc   Tue Oct 20 14:42:12 1998
***************
*** 2376,2383 ****
    for (r++; *r == ' ' || *r == '\t'; r++);
    h = r;
    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++);
!   *r++ = 0;
    idl_global->set_lineno(idl_atoi(h, 10));
    
    /* Find file name, if present */
    for (; *r != '"'; r++) {
--- 2376,2389 ----
    for (r++; *r == ' ' || *r == '\t'; r++);
    h = r;
    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++);
!   if (*r != '\0') {
!      *r++ = 0;
!   }
    idl_global->set_lineno(idl_atoi(h, 10));
+ 
+   if (*r == '\0') {
+     return;
+   }
    
    /* Find file name, if present */
    for (; *r != '"'; r++) {
***************
*** 2451,2458 ****
  
    h = r;
    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++);
!   *r++ = 0;
    idl_global->set_lineno(idl_atoi(h, 10));
    
    /* Find file name, if present */
    for (; *r != '"'; r++) {
--- 2457,2471 ----
  
    h = r;
    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++);
!   if (*r != '\0') {
!     *r++ = 0;
!   }
    idl_global->set_lineno(idl_atoi(h, 10));
+ 
+   if (*r == '\0') {
+      return;
+   }
+   
    
    /* Find file name, if present */
    for (; *r != '"'; r++) {
    

Action

 

For comments, feedback, etc, please see the 'Keeping in touch' page.
Copyright 1999 - AT&T Laboratories Cambridge