[Bug c/65455] typeof _Atomic fails
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 17 21:34:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65455
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
By design, typeof removes qualifiers in certain cases. Currently it only
removes them from atomic types (as needed for use in <stdatomic.h>), but
arguably it should do so more generally - this would be useful for certain
macros when passed const arguments, and would reflect that qualifiers on
rvalues are not meaningful in C standard terms (so rvalues should always
be considered to have unqualified type) but GCC's internal representation
may or may not have them.
/* For use in macros such as those in <stdatomic.h>, remove all
qualifiers from atomic types. (const can be an issue for more macros
using typeof than just the <stdatomic.h> ones.) */
More information about the Gcc-bugs
mailing list