Bug 4102

Summary: IDL Compiler gen wrong codes for AMH since 2.0.6
Product: TAO Reporter: Jiang Wei <jiangwei_1976>
Component: IDL CompilerAssignee: DOC Center Support List (internal) <tao-support>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 2.2.0   
Hardware: All   
OS: All   
Attachments: Patch to correct this problem
Regression Test
Patch v2.0 fix amh and c++ keyword bugs
Regression Test v2 add c++ keyword into Test.idl

Description Jiang Wei 2013-03-25 20:12:08 CDT
Created attachment 1460 [details]
Patch to correct this problem

IDL Compiler gen wrong codes for attributes in  AMH_*_Perfect_Hash_OpTable::lockup::TAO_operation_db_entry


  static const TAO_operation_db_entry wordlist[] =
    {
      {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0},
      {"_is_a", &TAO_AMH_Skeletons::_is_a_amh_skel, 0},

      //*** Wrong codes ***
      {"_get_t", &POA_Test::Roundtrip::_get_t_skel, 0},  
      {"_set_t", &POA_Test::Roundtrip::_set_t_skel, 0},
      {"_get_desc", &POA_Test::Roundtrip::_get_desc_skel, 0},

      {"_component", &TAO_AMH_Skeletons::_component_amh_skel, 0},
      {"test_method", &POA_Test::AMH_Roundtrip::test_method_skel, 0},
      {"_non_existent", &TAO_AMH_Skeletons::_non_existent_amh_skel, 0},
      {"_repository_id", &TAO_AMH_Skeletons::_repository_id_amh_skel, 0},
      {"start_test", &POA_Test::AMH_Roundtrip::start_test_skel, 0},
      {"end_test", &POA_Test::AMH_Roundtrip::end_test_skel, 0},
      {"_interface", &TAO_AMH_Skeletons::_interface_amh_skel, 0},
    };
Comment 1 Jiang Wei 2013-03-25 23:50:44 CDT
Created attachment 1461 [details]
Regression Test
Comment 2 Jiang Wei 2013-03-26 02:47:08 CDT
Created attachment 1462 [details]
Patch v2.0

fix amh and c++ keyword bugs

IDL Complier has another bug when operation(or attribute) name is a c++ keyword.

static const TAO_operation_db_entry wordlist[] =
    {
      {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0},
      {"_is_a", &TAO_AMH_Skeletons::_is_a_amh_skel, 0},
      {"modify", &POA_CosTrading::AMH_Register::modify_skel, 0},
      {"resolve", &POA_CosTrading::AMH_Register::resolve_skel, 0},
      {"withdraw", &POA_CosTrading::AMH_Register::withdraw_skel, 0},
      {"_interface", &TAO_AMH_Skeletons::_interface_amh_skel, 0},
>>>>  {"export", &POA_CosTrading::AMH_Register::export_skel, 0},
Comment 3 Jiang Wei 2013-03-26 02:48:17 CDT
Created attachment 1463 [details]
Regression Test v2
add c++ keyword into Test.idl
Comment 4 Johnny Willemsen 2013-08-12 07:08:50 CDT
Still a valid problem
Comment 5 Johnny Willemsen 2020-09-25 04:05:28 CDT
See also http://list.isis.vanderbilt.edu/pipermail/tao-users/2020-September/000235.html for a similar issue