On Jun 17, 2005, at 4:33 PM, [EMAIL PROTECTED] wrote:

Please, to run this script of 5 lines:

#!/bin/sh
cat > bug_void.c <<EOF
int main() { printf("sizeof(void) = %d\n",sizeof(void)); return 0; }

This is invalid code and a GNU extension to take the sizeof(void). The reason
why GCC defines it as 1 is because you can do the following:
void *a;
a++;

If you want to error out on GNU extensions, use -pedantic-errors.

Thanks,
Andrew Pinski

Reply via email to