[PATCH] D125919: Drop qualifiers from return types in C (DR423)

Dan Liew via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 11:49:25 PDT 2022


delcypher added a comment.

@aaron.ballman Hey I just saw this change and had questions about it. For others looking I think the resolution to DR423 is in https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1863.pdf, I found https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_423 hard to parse.

1. It looks like we're completely dropping qualifiers on the return types of function in C. If that's the case, what's even the point of having qualifiers on return types of functions?
2. Reading DR423 I see the problem but I don't understand why the desire to make `_Generic` work better in the presence of qualifiers means that qualifiers on function return types have to be dropped in all contexts. Couldn't this just be a thing that is done inside `_Generic` and no where else?

Sorry if these are silly questions and if I've misunderstood something, I saw n1863 say "functions return unqualified types" and I was very surprised.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125919/new/

https://reviews.llvm.org/D125919



More information about the cfe-commits mailing list