[omniORB] omniidl2 compiler bug ????? in omniORB2.6.0

Gary D. Duzan gdd0@gte.com
Tue, 20 Oct 1998 15:54:51 -0400


   I haven't checked your IDL specifically, but it sounds somewhat like
a bug I uncovered recently which had to do with proprocessor #line
directives. Try the attached patch and see if it helps. You'll probably
have to do a:

  chmod u+w src/tool/omniidl2/fe/lex.yy.cc

before applying the patch. If this doesn't help, you might look for
similar code in the same file.

					Gary Duzan
					GTE Laboratories



*** src/tool/omniidl2/fe/lex.yy.cc.orig	Fri Oct 16 11:17:29 1998
--- src/tool/omniidl2/fe/lex.yy.cc	Fri Oct 16 11:25:25 1998
***************
*** 2365,2370 ****
--- 2365,2371 ----
  {
    char		*r = buf;
    char 		*h;
+   char		k;
    UTL_String	*nm;
  
    /* Skip initial '#' */
***************
*** 2376,2383 ****
--- 2377,2389 ----
    for (r++; *r == ' ' || *r == '\t'; r++);
    h = r;
    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++);
+   k = *r;
    *r++ = 0;
    idl_global->set_lineno(idl_atoi(h, 10));
+ 
+   if(k == '\0') {
+     return;
+   }
    
    /* Find file name, if present */
    for (; *r != '"'; r++) {
***************
*** 2430,2435 ****
--- 2436,2442 ----
    char		*r = buf;
    char 		*h;
    char 		*j;
+   char		k;
    int count=0,jcount=0;
    UTL_String	*nm;
  
***************
*** 2451,2458 ****
--- 2458,2470 ----
  
    h = r;
    for (; *r != '\0' && *r != ' ' && *r != '\t'; r++);
+   k = *r;
    *r++ = 0;
    idl_global->set_lineno(idl_atoi(h, 10));
+ 
+   if(k == '\0') {
+     return;
+   }
    
    /* Find file name, if present */
    for (; *r != '"'; r++) {

===========================================================================


In Message <362CC6F2.47E29AD@neurotec.de> ,
   Ralf Walther <rw@neurotec.de> wrote:

=>This is a multi-part message in MIME format.
=>--------------8A7358CD8956FECADEA7F768
=>Content-Type: text/plain; charset=us-ascii
=>Content-Transfer-Encoding: 7bit
=>
=>Hi CORBAholics,
=>
=>it's me again and I have found a strange behaviour of the idl compiler
=>in omniORB 2.6.0.
=>It was possible to reduce my very complex idl files to an example which
=>shows following
=>error while compile time:
=>
=>omniidl2: "/tmp/idli_a05314.cc", line 16: error in lookup of symbol:
=>MyException
=>omniidl2: Main.idl: found 1 error
=>
=>This error indicates that the include statement doesn't work. Some
=>changes to the code
=>leave to a complete compilation (all changes to Main.idl)
=>
=>If I delete the comment in the first line -> it works
=>If I delete the comment only, leaving two lines before the #ifndef -> it
=>doesn't work
=>If I insert a comment line "// abcdefg" between #define and first
=>#include -> it works
=>
=>I think it's very very very strange. Does anybody be able to reconstruct
=>this error with his
=>2.6 idl compiler? If yes it could be a bug (one have to be careful with
=>such a statement right?)
=>If no, it could help us to find hints for the error source
=>
=>Best regards
=>
=>Ralf Walther