[tao-bugs] [PATCH] Honor '-Cw' flag passed to tao_idl
David Ward
david.ward at ll.mit.edu
Thu Jun 25 16:56:35 CDT 2015
tao_idl is not able to compile IDL files which have an identifier
that differs only in case from an IDL keyword, even if the '-Cw'
flag is used. For example:
$ cat > MyModule.idl << EOF
module MyModule {
interface PortType {
exception MyException {
string myString;
};
void myMethod ()
raises (MyModule::PortType::MyException);
};
};
EOF
$ tao_idl -Cw MyModule.idl
Error - tao_idl: "MyModule.idl", line 2: Warning - spelling differs from IDL keyword only in case: "PortType"
Error - tao_idl: "MyModule.idl", line 2: Warning - spelling differs from IDL keyword only in case: "PortType"
Error - tao_idl: "MyModule.idl", line 8: Warning - spelling differs from IDL keyword only in case: "PortType"
Error - tao_idl: "MyModule.idl", line 8: error in lookup of symbol: MyModule::PortType::MyException
This change allows such IDL files to compile when '-Cw' is used;
only the warnings still appear.
Signed-off-by: David Ward <david.ward at ll.mit.edu>
---
TAO/TAO_IDL/util/utl_scope.cpp | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index a829f43..6a90909 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -265,13 +265,11 @@ UTL_Scope::idl_keyword_clash (Identifier *e)
if (idl_global->case_diff_error ())
{
idl_global->err ()->idl_keyword_error (tmp);
- }
- else
- {
- idl_global->err ()->idl_keyword_warning (tmp);
+
+ return -1;
}
- return -1;
+ idl_global->err ()->idl_keyword_warning (tmp);
}
return 0;
--
1.7.1
More information about the tao-bugs
mailing list