On 6/29/26 12:57 PM, Jakub Jelinek wrote:
On Mon, Jun 29, 2026 at 12:42:30PM -0400, Jason Merrill wrote:
On 6/29/26 4:27 AM, Jakub Jelinek wrote:
On Fri, Jun 12, 2026 at 06:47:15PM +0200, Jakub Jelinek wrote:
The following patch on top of the just posted -std=c++29 patch
implements the C++29 P3540R3 - #embed offset parameter paper.

I've missed the bump of the feature test macro in that paper,
this updated version bumps it.

Bootstrapped/regtested again on x86_64-linux and i686-linux, ok for trunk?

@@ -1241,6 +1243,9 @@ _cpp_parse_embed_params (cpp_reader *pfi
                && memcmp (param_name, embed_params[i].name,
                           param_name_len) == 0)
              {
+               if (i == EMBED_PARAM_OFFSET
+                   && !CPP_OPTION (pfile, cplusplus))
+                 continue;

So in C the "offset" parameter will give an "unknown" error?  Why not an
"extension" pedwarn like in C++ before 29?

I wanted to wait until ThePhd pushes this into C29 too (which I think is the
plan, N3490 has it).
Until then, I see no reason to add an extension for C when we already
have one (gnu::offset).
But when it gets added to C, won't that mean removing these three lines again in favor of the extension pedwarn? It seems less work to skip this step. But if you prefer this approach, it's OK with a comment.

Jason

Reply via email to