Date
2025-02-15.00:00:00
Message id
8000

Content

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.