diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 4b8812c784..52acf3b03f 100644 --- a/compiler/aggas.pas +++ b/compiler/aggas.pas @@ -1452,7 +1452,12 @@ implementation begin WriteDirectiveName(tai_directive(hp).directive); if tai_directive(hp).name <>'' then - AsmWrite(tai_directive(hp).name); + begin + if replaceforbidden then + AsmWrite(ReplaceForbiddenAsmSymbolChars(tai_directive(hp).name)) + else + AsmWrite(tai_directive(hp).name); + end; AsmLn; end;