File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 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(
723723 {
724724 // section name is not empty, do a bit of parsing
725725 std::string asm_name = id2string (full_spec.section );
726- if (asm_name[0 ] != ' .' )
726+
727+ if (asm_name[0 ] == ' .' )
727728 {
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);
731733 }
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+
735735 asm_name += " $$" ;
736+
736737 if (!full_spec.asm_label .empty ())
737738 asm_name+=id2string (full_spec.asm_label );
738739 else
739740 asm_name+=id2string (symbol.name );
740741
741742 apply_asm_label (asm_name, symbol);
742743 }
744+
743745 irep_idt identifier=symbol.name ;
744746 d_it->set_name (identifier);
745747
You can’t perform that action at this time.
0 commit comments