Complete fix initialize const_value.
authorManuele Conti <conti.ma@alice.it>
Sat, 22 Dec 2012 19:34:57 +0100
changeset 775 0422ee273152
parent 774 979af2009d88
child 776 96a1199d0739
Complete fix initialize const_value.
absyntax/absyntax.hh
--- a/absyntax/absyntax.hh	Sat Dec 22 19:31:48 2012 +0100
+++ b/absyntax/absyntax.hh	Sat Dec 22 19:34:57 2012 +0100
@@ -148,10 +148,10 @@
                    cs_overflow     /* result produced overflow or underflow --> const_value is not valid! */
                  } const_status_t;
  
-    typedef struct {const_status_t status;  real64_t  value; } const_value_real64_t;
-    typedef struct {const_status_t status;   int64_t  value; } const_value_int64_t;
-    typedef struct {const_status_t status;  uint64_t  value; } const_value_uint64_t;
-    typedef struct {const_status_t status;      bool  value; } const_value_bool_t;
+    typedef struct const_value_real64_s {const_status_t status;  real64_t  value;  const_value_real64_s (): status(cs_undefined), value(0.0)   {} } const_value_real64_t;
+    typedef struct const_value_int64_s  {const_status_t status;   int64_t  value;  const_value_int64_s  (): status(cs_undefined), value(0)     {} } const_value_int64_t;
+    typedef struct const_value_uint64_s {const_status_t status;  uint64_t  value;  const_value_uint64_s (): status(cs_undefined), value(0)     {} } const_value_uint64_t;
+    typedef struct const_value_bool_s   {const_status_t status;      bool  value;  const_value_bool_s   (): status(cs_undefined), value(false) {} } const_value_bool_t;
 
     typedef struct {
       const_value_real64_t _real64; /* status is initialised to UNDEFINED */