--- a/stage4/generate_cc/generate_location_list.cc Thu Aug 30 16:40:20 2007 +0200
+++ b/stage4/generate_cc/generate_location_list.cc Mon Sep 17 17:47:10 2007 +0200
@@ -118,14 +118,16 @@
/********************************************/
void *visit(direct_variable_c *symbol) {
- s4o.print("__LOCATED_VAR(");
- current_var_type_symbol->accept(*generate_cc_base);
- s4o.print(",");
- /* Do not use print_token() as it will change everything into uppercase */
- s4o.printlocation((symbol->value)+1);
- s4o.print(",");
- s4o.printlocation_comasep((symbol->value)+1);
- s4o.print(")\n");
+ if (current_var_type_symbol) {
+ s4o.print("__LOCATED_VAR(");
+ current_var_type_symbol->accept(*generate_cc_base);
+ s4o.print(",");
+ /* Do not use print_token() as it will change everything into uppercase */
+ s4o.printlocation((symbol->value)+1);
+ s4o.print(",");
+ s4o.printlocation_comasep((symbol->value)+1);
+ s4o.print(")\n");
+ }
return NULL;
}