================
@@ -564,6 +564,9 @@ unsigned Parser::ParseAttributeArgsCommon(
nullptr,
Sema::ExpressionEvaluationContextRecord::EK_AttrArgument);
+ SaveAndRestore<ConversionAction> SavedTranslationState(
+ ParserConversionAction, CA_NoConversion);
----------------
perry-ca wrote:
I've got a branch on my fork with the changes sans the ParseConversionAction
part. A typical syntax for the pragma is:
```cpp
#pragma map (printf, "\174\174A00118")
```
The string literal has to be parsed with ebcdic encoding regardless of the
exec-charset setting. The escape sequences are ebcdic code points so we can't
just treat the string as utf-8 and then translate to ebcdic. The escape
sequences won't be handled correctly.
I also see a change happened in the description of #138895 (last Nov.). That
will cause problems on z/OS.
>+║asm("...") │n/a (internal encoding, UTF-8) ║
-║asm("...") │system charset (IBM-1047 on z/OS)║
This handling of string literals also applies to asm statements. The asm
statements can have escape sequences too. On z/OS those will be for ebcdic
characters too. We'll need the ParseConversionAction for asm string literals
too.
The line for asm string literals might better be documented as:
>║asm("...") │system charset (UTF-8, IBM-1047 on
>z/OS)║
https://github.com/llvm/llvm-project/pull/169803
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits