Minor changes needed to build with pedantic flag.
authorManuele Conti <conti.ma@alice.it>
Wed, 26 Sep 2012 20:12:39 +0200
changeset 661 f537c3315f83
parent 660 9565d7d944ce
child 662 b1b11dd09a54
Minor changes needed to build with pedantic flag.
absyntax_utils/case_element_iterator.hh
stage3/array_range_check.cc
stage3/constant_folding.cc
stage3/declaration_check.cc
stage3/fill_candidate_datatypes.cc
stage3/flow_control_analysis.cc
stage3/lvalue_check.cc
stage3/narrow_candidate_datatypes.cc
stage4/generate_c/generate_c.cc
stage4/generate_c/generate_c_typedecl.cc
stage4/generate_c/generate_c_vardecl.cc
stage4/generate_c/generate_var_list.cc
--- a/absyntax_utils/case_element_iterator.hh	Fri Sep 21 09:54:10 2012 +0100
+++ b/absyntax_utils/case_element_iterator.hh	Wed Sep 26 20:12:39 2012 +0200
@@ -55,7 +55,7 @@
      */
     typedef enum {
       element_single,
-      element_subrange,
+      element_subrange
     } case_element_t ;
 
 
--- a/stage3/array_range_check.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/array_range_check.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -89,6 +89,7 @@
 array_range_check_c::array_range_check_c(symbol_c *ignore) {
 	error_count = 0;
 	current_display_error_level = 0;
+	search_varfb_instance_type = NULL;
 }
 
 
--- a/stage3/constant_folding.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/constant_folding.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -732,6 +732,9 @@
     error_count = 0;
     warning_found = false;
     current_display_error_level = 0;
+    il_operand = NULL;
+    search_varfb_instance_type = NULL;
+    prev_il_instruction = NULL;
     
     /* check whether the platform on which the compiler is being run implements IEC 559 floating point data types. */
     symbol_c null_symbol;
--- a/stage3/declaration_check.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/declaration_check.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -71,6 +71,8 @@
 
 
 declaration_check_c::declaration_check_c(symbol_c *ignore) {
+  current_display_error_level = 0;
+  current_pou_decl = NULL;
   error_count = 0;
 }
 
--- a/stage3/fill_candidate_datatypes.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/fill_candidate_datatypes.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -72,6 +72,9 @@
 static int debug = 0;
 
 fill_candidate_datatypes_c::fill_candidate_datatypes_c(symbol_c *ignore) {
+	il_operand = NULL;
+	prev_il_instruction = NULL;
+	search_varfb_instance_type = NULL;
 }
 
 fill_candidate_datatypes_c::~fill_candidate_datatypes_c(void) {
--- a/stage3/flow_control_analysis.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/flow_control_analysis.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -123,6 +123,8 @@
 flow_control_analysis_c::flow_control_analysis_c(symbol_c *ignore) {
   prev_il_instruction = NULL;
   curr_il_instruction = NULL;
+  prev_il_instruction_is_JMP_or_RET = false;
+  search_il_label = NULL;
 }
 
 flow_control_analysis_c::~flow_control_analysis_c(void) {
--- a/stage3/lvalue_check.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/lvalue_check.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -73,6 +73,8 @@
 	error_count = 0;
 	current_display_error_level = 0;
 	current_il_operand = NULL;
+	search_varfb_instance_type = NULL;
+	search_var_instance_decl = NULL;
 }
 
 lvalue_check_c::~lvalue_check_c(void) {
--- a/stage3/narrow_candidate_datatypes.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage3/narrow_candidate_datatypes.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -66,6 +66,11 @@
 static int debug = 0;
 
 narrow_candidate_datatypes_c::narrow_candidate_datatypes_c(symbol_c *ignore) {
+	prev_il_instructions = NULL;
+	search_varfb_instance_type = NULL;
+	prev_il_instructions_intersected_datatypes = NULL;
+	fake_prev_il_instruction = NULL;
+	il_operand = NULL;
 }
 
 narrow_candidate_datatypes_c::~narrow_candidate_datatypes_c(void) {
--- a/stage4/generate_c/generate_c.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage4/generate_c/generate_c.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -415,7 +415,7 @@
   };
   ERROR; // should never reach this point!
   return 0; // humour the compiler!
-};
+}
 
 /***********************************************************************/
 /***********************************************************************/
@@ -574,7 +574,7 @@
     typedef enum {
       none_im,
       arrayname_im,
-      arraydeclaration_im,
+      arraydeclaration_im
     } inlinearray_mode_t;
 
   private:
@@ -2286,7 +2286,7 @@
     typedef enum {
       none_gm,
       datatypes_gm,
-      pous_gm,
+      pous_gm
     } generate_mode_t;
 
   protected:
--- a/stage4/generate_c/generate_c_typedecl.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage4/generate_c/generate_c_typedecl.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -58,7 +58,7 @@
       enumerated_td,
       subrange_td,
       array_td,
-      struct_td,
+      struct_td
     } typedefinition_t;
 
     typedefinition_t current_typedefinition;
--- a/stage4/generate_c/generate_c_vardecl.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage4/generate_c/generate_c_vardecl.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -826,7 +826,7 @@
                   init_vf,
                   constructorinit_vf,
                   globalinit_vf,
-                  globalprototype_vf,
+                  globalprototype_vf
                  } varformat_t;
 
 
--- a/stage4/generate_c/generate_var_list.cc	Fri Sep 21 09:54:10 2012 +0100
+++ b/stage4/generate_c/generate_var_list.cc	Wed Sep 26 20:12:39 2012 +0200
@@ -206,7 +206,7 @@
       external_vcc,
       located_input_vcc,
       located_memory_vcc,
-      located_output_vcc,
+      located_output_vcc
     } varclasscategory_t;
 
     varclasscategory_t current_var_class_category;