stage3/print_datatypes_error.cc
changeset 558 9273dfc5fa7c
parent 552 3c39d80fdede
child 676 ca4f17211251
equal deleted inserted replaced
557:95a2fe60a15c 558:9273dfc5fa7c
   647 void *print_datatypes_error_c::visit(located_var_decl_c *symbol) {
   647 void *print_datatypes_error_c::visit(located_var_decl_c *symbol) {
   648   symbol->located_var_spec_init->accept(*this);
   648   symbol->located_var_spec_init->accept(*this);
   649   /* It does not make sense to call symbol->location->accept(*this). The check is done right here if the following if() */
   649   /* It does not make sense to call symbol->location->accept(*this). The check is done right here if the following if() */
   650   // symbol->location->accept(*this); 
   650   // symbol->location->accept(*this); 
   651   if ((is_type_valid(symbol->located_var_spec_init->datatype)) && (!is_type_valid(symbol->location->datatype)))
   651   if ((is_type_valid(symbol->located_var_spec_init->datatype)) && (!is_type_valid(symbol->location->datatype)))
   652     STAGE3_ERROR(0, symbol, symbol, "Location is incompatible with data type.");
   652     STAGE3_ERROR(0, symbol, symbol, "Bit size of data type is incompatible with bit size of location.");
   653   return NULL;
   653   return NULL;
   654 }  
   654 }  
   655 
   655 
   656 
   656 
   657 /************************************/
   657 /************************************/