File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -723,23 +723,25 @@ void c_typecheck_baset::typecheck_declaration(
723
723
{
724
724
// section name is not empty, do a bit of parsing
725
725
std::string asm_name = id2string (full_spec.section );
726
- if (asm_name[0 ] != ' .' )
726
+
727
+ if (asm_name[0 ] == ' .' )
727
728
{
728
- warning ().source_location = symbol.location ;
729
- warning () << " section name `" << asm_name
730
- << " ' expected to start with `.'" << eom;
729
+ std::string::size_type primary_section = asm_name.find (' .' , 1 );
730
+
731
+ if (primary_section != std::string::npos)
732
+ asm_name.resize (primary_section);
731
733
}
732
- std::string::size_type primary_section = asm_name.find (' .' , 1 );
733
- if (primary_section != std::string::npos)
734
- asm_name.resize (primary_section);
734
+
735
735
asm_name += " $$" ;
736
+
736
737
if (!full_spec.asm_label .empty ())
737
738
asm_name+=id2string (full_spec.asm_label );
738
739
else
739
740
asm_name+=id2string (symbol.name );
740
741
741
742
apply_asm_label (asm_name, symbol);
742
743
}
744
+
743
745
irep_idt identifier=symbol.name ;
744
746
d_it->set_name (identifier);
745
747
You can’t perform that action at this time.
0 commit comments