diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-11-11 21:59:05 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-11-11 22:21:57 +0100 |
commit | 9eebc7c324ad8554b68faa8277cafb37844d0d3e (patch) | |
tree | f0d64190da1a4a713237738eeedba4317e57e920 | |
parent | a9677aa57de0fe0fd5eb23938f562e4ba9b0556b (diff) | |
download | vala-9eebc7c324ad8554b68faa8277cafb37844d0d3e.tar.gz |
ccode: Fix and disable deprecating EnumValue
This still requires GCC 6.0 and later to work.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043
-rw-r--r-- | ccode/valaccodeenumvalue.vala | 8 | ||||
-rw-r--r-- | tests/annotations/deprecated.vala | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ccode/valaccodeenumvalue.vala b/ccode/valaccodeenumvalue.vala index e952f4b90..2fa408587 100644 --- a/ccode/valaccodeenumvalue.vala +++ b/ccode/valaccodeenumvalue.vala @@ -43,12 +43,14 @@ public class Vala.CCodeEnumValue : CCodeNode { public override void write (CCodeWriter writer) { writer.write_string (name); + if (CCodeModifiers.DEPRECATED in modifiers) { + // FIXME Requires GCC 6.0 to work at this place + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47043 + //writer.write_string (" G_GNUC_DEPRECATED"); + } if (value != null) { writer.write_string (" = "); value.write (writer); } - if (CCodeModifiers.DEPRECATED in modifiers) { - writer.write_string (" G_GNUC_DEPRECATED"); - } } } diff --git a/tests/annotations/deprecated.vala b/tests/annotations/deprecated.vala index 91ed21ee8..0968b1538 100644 --- a/tests/annotations/deprecated.vala +++ b/tests/annotations/deprecated.vala @@ -32,7 +32,9 @@ void test_class_property () { [Version (deprecated = true)] enum FooEnum { [Version (deprecated = true)] - BAR, + BAR = 0, + [Version (deprecated = true)] + FOO, BAZ; } |