On Tue, Jun 10, 2025 at 09:52:42AM +0200, David Brown via Gcc wrote: > So while correcting the mistakes of the past is either very slow or > impossible, we can avoid them in the future. Consistent parameter order > makes code clearer and neater, and should be encouraged.
If the clauses are properly documented, enforcing some order is just a hassle to users who will need to remember the ordering (which won't be obvious). The #embed parameters are really similar to OpenMP/OpenACC clauses and those haven't enforced any particular ordering for 25+ years (the only exception are unnamed clauses that on certain directives must appear first followed by other clauses). The limit/offset clauses are handled at a different time during preprocessing than if_empty/prefix/suffix, the former to find out what part of data if any will be read from the file (if it exists), the latter when the directive is being replaced by new tokens. Whether limit (0) actually affects what if_empty/prefix/suffix clauses will do depends on if the resource is empty or not, and limit with non-zero size will never affect it. offset clause will affect those only if it is larger or equal than the file size. Jakub