D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22909 - importC: u8 strings rejected by parser
Summary: importC: u8 strings rejected by parser
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-03-20 19:58 UTC by Iain Buclaw
Modified: 2022-03-20 23:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2022-03-20 19:58:52 UTC
C11 6.4.5 String literals

string-literal:
    encoding-prefix(opt) " s-char-sequence(opt) "

encoding-prefix:
    u8
    u
    U
    L

6.4.5-4: A character string literal is a sequence of zero or more multibyte characters enclosed in double-quotes, as in "xyz". A UTF−8 string literal is the same, except prefixed by u8.

6.4.5-6: For UTF−8 string literals, the array elements have type char, and are
initialized with the characters of the multibyte character sequence, as encoded in UTF−8.
Comment 1 Dlang Bot 2022-03-20 20:23:23 UTC
@ibuclaw created dlang/dmd pull request #13848 "fix Issue 22909 - importC: u8 strings rejected by parser" fixing this issue:

- fix Issue 22909 - importC: u8 strings rejected by parser

https://github.com/dlang/dmd/pull/13848
Comment 2 Dlang Bot 2022-03-20 23:47:16 UTC
dlang/dmd pull request #13848 "fix Issue 22909 - importC: u8 strings rejected by parser" was merged into master:

- c0cbb8b501464d34626b682ceb10647ad931d6b7 by Iain Buclaw:
  fix Issue 22909 - importC: u8 strings rejected by parser

https://github.com/dlang/dmd/pull/13848