diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-07-23 21:03:45 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-07-23 21:03:45 +0000 |
commit | c1aa4ecd345280ae120755d45f136870845eca07 (patch) | |
tree | ad337b9f231c3e94c7b489076c4ccc1ea0bbbdab /TAO/TAO_IDL | |
parent | ede2b7613fe85336e35ba2875452a178575cbc77 (diff) | |
download | ATCD-c1aa4ecd345280ae120755d45f136870845eca07.tar.gz |
ChangeLogTag: Fri Jul 23 20:59:59 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/driver/drv_args.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.yy | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/y.tab.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/idl_global.h | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 13 |
5 files changed, 47 insertions, 8 deletions
diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index 030c80eecb8..9a50b723caa 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -148,6 +148,11 @@ DRV_usage (void) )); ACE_DEBUG (( LM_DEBUG, + ACE_TEXT (" -as\t\t\tSilences the anonymous type diagnostic ") + ACE_TEXT ("(default is error)\n") + )); + ACE_DEBUG (( + LM_DEBUG, ACE_TEXT (" -d\t\t\tOutputs (to stdout) a dump of the AST\n") )); ACE_DEBUG (( @@ -267,6 +272,10 @@ DRV_parse_args (long ac, char **av) { idl_global->anon_warning (true); } + else if (av[i][2] == 's') + { + idl_global->anon_silent (true); + } else { ACE_ERROR (( diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy index 6e6dc03fa13..c4bc88c7d5c 100644 --- a/TAO/TAO_IDL/fe/idl.yy +++ b/TAO/TAO_IDL/fe/idl.yy @@ -3605,7 +3605,8 @@ sequence_type_spec s->is_abstract () ); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } @@ -3664,7 +3665,8 @@ sequence_type_spec s->is_abstract () ); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } @@ -3769,7 +3771,8 @@ string_type_spec ) ); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } @@ -3887,7 +3890,8 @@ array_declarator : sn.destroy (); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp index 9b02d27872b..82a566d4e04 100644 --- a/TAO/TAO_IDL/fe/y.tab.cpp +++ b/TAO/TAO_IDL/fe/y.tab.cpp @@ -6181,7 +6181,8 @@ tao_yyreduce: s->is_abstract () ); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } @@ -6242,7 +6243,8 @@ tao_yyreduce: s->is_abstract () ); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } @@ -6331,7 +6333,8 @@ tao_yyreduce: ) ); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } @@ -6490,7 +6493,8 @@ tao_yyreduce: sn.destroy (); - if (!idl_global->in_typedef ()) + if (!idl_global->in_typedef () + && !idl_global->anon_silent ()) { idl_global->err ()->anonymous_type_diagnostic (); } diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h index 8809691ab8e..0c229e314fe 100644 --- a/TAO/TAO_IDL/include/idl_global.h +++ b/TAO/TAO_IDL/include/idl_global.h @@ -714,6 +714,10 @@ public: void anon_warning (bool val); // Accessors for the member. + bool anon_silent (void) const; + void anon_silent (bool val); + // Accessors for the member. + bool in_typedef (void) const; void in_typedef (bool val); // Accessors for the member. @@ -885,8 +889,13 @@ private: /// Anonymous type diagnostic limited to warning? /// False by default, can be overridden from command line. + /// Error mesesage is default behavior. bool anon_warning_; + /// Anonymous type diagnostic completely disabled? + /// False by default. + bool anon_silent_; + /// Flag set in parser so we can decide whether to emit /// an anonymous type diagnostic. bool in_typedef_; diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index de0e59099cf..2a9628ff2a3 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -153,6 +153,7 @@ IDL_GlobalData::IDL_GlobalData (void) included_ami_receps_done_ (false), corba_module_ (0), anon_warning_ (false), + anon_silent_ (false), in_typedef_ (false) { // Path for the perfect hash generator(gperf) program. @@ -1739,6 +1740,18 @@ IDL_GlobalData::anon_warning (bool val) } bool +IDL_GlobalData::anon_silent (void) const +{ + return this->anon_silent_; +} + +void +IDL_GlobalData::anon_silent (bool val) +{ + this->anon_silent_ = val; +} + +bool IDL_GlobalData::in_typedef (void) const { return this->in_typedef_; |