diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-17 08:17:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-09-17 08:17:06 +0200 |
commit | 76088fe3dfdf541281942b43cb72b021b6fd2ee3 (patch) | |
tree | d85ded1a5f23b0227914a1841e4323e91b2170ad /odb/context.hxx | |
parent | 9b7f203f1f8a40765649312442efa9602335f757 (diff) |
Convert integer and floating default values immediately2.1.0
It appears that GCC 4.8 reuses token tree nodes that are returned
during pragma parsing. So saving such nodes for later no longer works.
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/odb/context.hxx b/odb/context.hxx index 8ae110a..4503e7f 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -117,15 +117,22 @@ struct default_value { reset, // Default value reset. null, - boolean, - number, // Integer of floating-point number. Value contains sign. - string, - enumerator // Value is the name, node is the tree node. + boolean, // Literal contains value (true or false). + integer, // Integer number. Literal contains sign. + floating, // Floating-point number. + string, // Literal contains value. + enumerator // Literal is the name, enum_value is the tree node. }; kind_type kind; - std::string value; - tree node; + std::string literal; + + union + { + tree enum_value; + unsigned long long int_value; + double float_value; + }; }; // Database potentially-qualified name. |