[Bug c/65244] Bogus -Wmaybe-uninitialized warning with posix_memalign() and -Og
ulfalizer at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Feb 27 21:58:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65244
--- Comment #6 from Ulf Magnusson <ulfalizer at gmail dot com> ---
Comment on attachment 34894
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34894
-Wmaybe-uninitialized-warning with -Og with GCC 4.9.1
void exit(int __status) __attribute__ ((__noreturn__));
int posix_memalign(void **__memptr, __SIZE_TYPE__ __alignment, __SIZE_TYPE__
__size);
void *f(void) {
void *ptr;
if (posix_memalign(&ptr, 16, 256) != 0)
exit(1);
return ptr;
}
More information about the Gcc-bugs
mailing list