On Wed, 17 Aug 2022 14:48:27 +0000, Seymour J Metz wrote:
>Unlike PL/I, C treats characters and strings differently. C uses apostrophes
>for character constants, which are limited to single characters, either
>explicitly or due to a backslash (\) escape sequence. IMHO the message should
>be an error, not a warning.
>
I haven't the C standard handy. IIRC, the treatment of multi-character
constants is
implementation-dependent. So an error or a warning is permitted. Or,
int X = 'XYZ';
could quietly be treated as:
X DC CL4'XYZ'
The z/OS C/C++ Ref. mentions "multicharacter literals" but says precious little
about
their semantics.
--
gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN