-fstrict-aliasing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is GCC permitted to miscompile, with -fstrict-aliasing, source
which clearly flouts the assumptions of that option ?

eg.

#include <stdio.h>

unsigned int x, y;
float i, j;
int r;

int main()
{
	x = 0xFFFFFFFE;
	y = 0xCBFFFFFE;
	i = *(float*)&x;
	j = *(float*)&y;
	r = i<=j;
	printf("result = %d\n", r);
	return 0;
}

TIA, John Parkes



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux