[Bug c++/127196] [contracts] redeclaration of function with type dependent param used in postcondition accepts non-const param
waffl3x at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 6 00:07:10 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127196
--- Comment #4 from Waffl3x <waffl3x at gcc dot gnu.org> ---
After working on this for a while, I'm not so sure that the necessary
changes will be acceptable. I somewhat want to wait on the final
resolution of CWG1001, CWG1322, and CWG1668.
Of course as soon as I write this I feel like working on it again. I
still won't be surprised if the necessary changes are shot down as too
invasive or complicated.
We have to effectively remember the dependent parameter declarations
(that are used in a postcondition) of every function declaration, and
substitute into all of them to see if they are const. Combined with how
declarations are already handled, it becomes quite a task.
More information about the Gcc-bugs
mailing list