[Bug c/90941] [rfe] attribute to specify write-once static variable for early-initialized values
crrodriguez at opensuse dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 19 23:21:05 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90941
Cristian Rodríguez <crrodriguez at opensuse dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crrodriguez at opensuse dot org
--- Comment #3 from Cristian Rodríguez <crrodriguez at opensuse dot org> ---
a variable __attribute__(("write_once")) will indeed be extremely useful,
genertating compile time errors if more than one write to the variable is
detected and either a warning and/or a __builtin_trap() when it cannot prove
it.
The idea of reusing restrict is also reasonable..hope this can gain some
traction.
More information about the Gcc-bugs
mailing list