Bug 612

Summary: IDL compiler problem
Product: TAO Reporter: Chanaka Liyanaarachchi <chanaka>
Component: IDL CompilerAssignee: Jeff Parsons <parsons>
Status: RESOLVED ---    
Severity: normal CC: chanaka
Priority: P3    
Version: 1.1.4   
Hardware: other   
OS: Linux   

Description Chanaka Liyanaarachchi 2000-07-12 17:01:57 CDT
When compiled the following "Messenger.idl", the "MessengerS.cpp" seem to have
a "typo" (see below).


-------------------------------------------------------
// Messenger.idl

#include <TimeBase.idl>

exception MessengerUnableToSendMessage
{
};

interface Messenger
{

  boolean send_message(in string user_name,
                       in string subject,
                       inout string message,
                       out TimeBase::TimeT time_sent)
    raises (MessengerUnableToSendMessage);

  readonly attribute long delivery_costs_today;
};
---------------------------------------------------------------
Compile this as follows:
tao_idl -Ge 1  -GC -I/vol1/1.1.4/ACE_wrappers/TAO/orbsvcs/orbsvcs
-I/vol1/1.1.4/ACE_wrappers/TAO    Messenger.idl

From my MessengerS.cpp
----------------------------------------------------------------

{
  enum
    {
      TOTAL_KEYWORDS = 6,
      MIN_WORD_LENGTH = 5,
      MAX_WORD_LENGTH = 30,
      MIN_HASH_VALUE = 5,
      MAX_HASH_VALUE = 30,
      HASH_VALUE_RANGE = 26,
      DUPLICATES = 0
    };

  static const class TAO_operation_db_entry  wordlist[] =
    {
      {"",0},{"",0},{"",0},{"",0},{"",0},
      {"_is_a",  &POA_AMI_MessengerHandler::_is_a_skel},
      {"",0},{"",0},{"",0},{"",0},{"",0},{"",0},
      {"send_message",  &POA_AMI_MessengerHandler::send_message_skel},
      {"_non_existent",  &POA_AMI_MessengerHandler::_non_existent_skel},
      {"",0},{"",0},{"",0},{"",0},
      {"send_message_excep",   
&POA_AMI_MessengerHandler::send_message_excep_skel},
      {"",0},{"",0},{"",0},{"",0},{"",0},
      {"get_delivery_costs_today",     
&POA_AMI_MessengerHandler::get_delivery_costs_today_skel},
      {"",0},{"",0},{"",0},{"",0},{"",0},
      {"get_delivery_costs_today_excep",       
&POA_AMI_MessengerHandler::get_delivery_costs_today_excep_skel},
    };

  if (len <= MAX_WORLENGTH && len >= MIN_WORD_LENGTH)
                  
            ^^^^^^^^^^^^^^^

NOTE: MAX_WORD_LENGTH seem to  be used in two places, and one of them is 
correctly spelt. 

---------------------------------------------------------------------------
However, with 1.1.4 and on the same host with a exceptions=1 build, the above
problem does not exist.

~
Comment 1 Jeff Parsons 2000-07-21 15:25:01 CDT
Can't reproduce this problem. The line in question is output by gperf in
Key_List.cpp, and there hasn't been a typo like this in that file going
back four months.