Title
Comma-delimited vs. comma-separated output for #embed
Status
open
Section
15.4.1 [cpp.embed.gen]
Submitter
Hubert Tong

Created on 2025-02-15.00:00:00 last changed 1 month ago

Messages

Date: 2025-02-15.00:00:00

Subclause 15.4.1 [cpp.embed.gen] paragraph 7 specifies "comma-delimited" output for #embed. However, that allows for a trailing comma that is undesirable.

Possible resolution:

Change in 15.4.1 [cpp.embed.gen] paragraph 7 and paragraph 8 as follows:

The #embed directive is replaced by a comma-delimited comma-separated list of integer literals of type int, unless otherwise modified by embed parameters (15.4.2 [cpp.embed.param]).

The integer literals in the comma-delimited comma-separated list correspond to resource-count consecutive calls to std::fgetc (31.13.1 [cstdio.syn]) from the resource, as a binary file. If any call to std::fgetc returns EOF, the program is ill-formed.

History
Date User Action Args
2025-02-15 00:00:00admincreate