summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-07-23 21:03:45 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-07-23 21:03:45 +0000
commitc1aa4ecd345280ae120755d45f136870845eca07 (patch)
treead337b9f231c3e94c7b489076c4ccc1ea0bbbdab /TAO
parentede2b7613fe85336e35ba2875452a178575cbc77 (diff)
downloadATCD-c1aa4ecd345280ae120755d45f136870845eca07.tar.gz
ChangeLogTag: Fri Jul 23 20:59:59 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog19
-rw-r--r--TAO/TAO_IDL/driver/drv_args.cpp9
-rw-r--r--TAO/TAO_IDL/fe/idl.yy12
-rw-r--r--TAO/TAO_IDL/fe/y.tab.cpp12
-rw-r--r--TAO/TAO_IDL/include/idl_global.h9
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp13
-rw-r--r--TAO/docs/compiler.html10
-rw-r--r--TAO/tests/IDL_Test/IDL_Test.mpc4
8 files changed, 78 insertions, 10 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 858d3eca2ba..bec91fee986 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,22 @@
+Fri Jul 23 20:59:59 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/include/idl_global.h:
+ * TAO_IDL/fe/y.tab.cpp:
+ * TAO_IDL/fe/idl.yy:
+ * TAO_IDL/driver/drv_args.cpp:
+ * TAO_IDL/util/utl_global.cpp:
+
+ Added -as option to completely silence any diagnostic
+ for anonymous IDL constructs.
+
+ * docs/compiler.html:
+
+ Updated IDL compiler options documentation.
+
+ * tests/IDL_Test/IDL_Test.mpc:
+
+ Replace -aw option with the new -as option.
+
Fri Jul 23 19:56:53 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* tests/Param_Test/big_union.cpp:
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_;
diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html
index 421cf37edd2..3edabc455df 100644
--- a/TAO/docs/compiler.html
+++ b/TAO/docs/compiler.html
@@ -765,6 +765,16 @@ also receives other options that are specific to it.<p>
IDL files, written before anonymous types were deprecated.</td>
</tr>
+ <tr><a name="as">
+ <td><tt>-as</tt></td>
+
+ <td>Silence any diagnostic output for anonymous types.
+ (default is output of error message).</td>
+
+ <td>This option has been added as a nicety for dealing with legacy
+ IDL files, written before anonymous types were deprecated.</td>
+ </tr>
+
<tr><a name="GC flag">
<td><tt>-GC </tt></td>
diff --git a/TAO/tests/IDL_Test/IDL_Test.mpc b/TAO/tests/IDL_Test/IDL_Test.mpc
index 215ca160d11..d4c449c42a5 100644
--- a/TAO/tests/IDL_Test/IDL_Test.mpc
+++ b/TAO/tests/IDL_Test/IDL_Test.mpc
@@ -61,14 +61,14 @@ project(*IDL): taoserver, messaging, gen_ostream {
}
IDL_Files {
- idlflags += -GA -aw
+ idlflags += -GA -as
anonymous.idl
dif2.idl
valuetype.idl
}
IDL_Files {
- idlflags += -aw
+ idlflags += -as
array.idl
enum_in_struct.idl
included.idl