diff options
author | Fred Hornsey <hornseyf@objectcomputing.com> | 2020-06-11 16:31:16 -0500 |
---|---|---|
committer | Fred Hornsey <hornseyf@objectcomputing.com> | 2020-06-11 16:31:16 -0500 |
commit | a3d5544c8fa6734e8cb57f48a15d39a57488f4aa (patch) | |
tree | c1e1b5d5cdb4128118c957ef9d1654e2a30d8ab5 /TAO/TAO_IDL | |
parent | 5dd2f8932d5ad7180790ff54e439fcaa3ba8109c (diff) | |
download | ATCD-a3d5544c8fa6734e8cb57f48a15d39a57488f4aa.tar.gz |
Change Anonymous Type Messages
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/include/idl_global.h | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/utl_err.h | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_err.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 6 |
4 files changed, 17 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h index 89377f4a987..d00dffdcbd8 100644 --- a/TAO/TAO_IDL/include/idl_global.h +++ b/TAO/TAO_IDL/include/idl_global.h @@ -691,6 +691,9 @@ public: void anon_type_diagnostic (ANON_TYPE_DIAGNOSTIC val); // Mutator for the member. + /// Has anon_type_diagnostic () been called? + bool explicit_anon_type_diagnostic () const; + bool anon_error (void) const; bool anon_warning (void) const; bool anon_silent (void) const; diff --git a/TAO/TAO_IDL/include/utl_err.h b/TAO/TAO_IDL/include/utl_err.h index 2cff2cc4069..b80970dbe42 100644 --- a/TAO/TAO_IDL/include/utl_err.h +++ b/TAO/TAO_IDL/include/utl_err.h @@ -130,6 +130,7 @@ public: EIDL_KEYWORD_WARNING, // Same as above, but only a warning EIDL_ANONYMOUS_ERROR, // Anonymous types are deprecated by spec EIDL_ANONYMOUS_WARNING, // Same as above, but only a warning + EIDL_ANONYMOUS_EXPLICIT_ERROR, // Anonymous types have been explicitly disabled EIDL_ENUM_VAL_EXPECTED, // Expected an enumerator EIDL_ENUM_VAL_NOT_FOUND, // Didnt find an enumerator with that name EIDL_EVAL_ERROR, // Error in evaluating expression diff --git a/TAO/TAO_IDL/util/utl_err.cpp b/TAO/TAO_IDL/util/utl_err.cpp index 723a25b23fe..c9639fc9f6c 100644 --- a/TAO/TAO_IDL/util/utl_err.cpp +++ b/TAO/TAO_IDL/util/utl_err.cpp @@ -185,11 +185,12 @@ error_string (UTL_Error::ErrorCode c) case UTL_Error::EIDL_KEYWORD_WARNING: return "Warning - spelling differs from IDL keyword only in case: "; case UTL_Error::EIDL_ANONYMOUS_ERROR: - return "Error: anonymous types are deprecated by OMG spec in IDL3, " - "but are valid again in IDL4"; + return "anonymous types require the IDL version to be 4 or later or must " + "be explictly enabled using -as"; case UTL_Error::EIDL_ANONYMOUS_WARNING: - return "Warning - anonymous types are deprecated by OMG spec in IDL3, " - "but are valid in IDL4"; + return "anonymous type found"; + case UTL_Error::EIDL_ANONYMOUS_EXPLICIT_ERROR: + return "anonymous types have been disabled"; case UTL_Error::EIDL_ENUM_VAL_EXPECTED: return "enumerator expected: "; case UTL_Error::EIDL_ENUM_VAL_NOT_FOUND: @@ -1527,7 +1528,8 @@ UTL_Error::anonymous_type_diagnostic (void) } else { - idl_error_header (EIDL_ANONYMOUS_ERROR); + idl_error_header (idl_global->explicit_anon_type_diagnostic () ? + EIDL_ANONYMOUS_EXPLICIT_ERROR : EIDL_ANONYMOUS_ERROR); ACE_ERROR ((LM_ERROR, "\n")); } } diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 34a0c11ce19..686be6f0ff4 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -1844,6 +1844,12 @@ IDL_GlobalData::anon_type_diagnostic ( } bool +IDL_GlobalData::explicit_anon_type_diagnostic () const +{ + return explicit_anon_type_diagnostic_; +} + +bool IDL_GlobalData::anon_error (void) const { if (idl_version_ >= IDL_VERSION_4 && !explicit_anon_type_diagnostic_) { |