Re: [PATCH 1/1] Work around gcc-4.7's strict aliasing checks

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

 



On 24/01/2012 01:59, Michal Soltys wrote:

Well, IMHO the [probably] best workaround for now would be
-fno-strict-aliasing then - which avoids warnings, ugly attribute
[over]use, and should assure expected behavior.

Say, near the top of Makefile:

-CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)
+CFLAGS = $(CWFLAGS) $(CXFLAGS) -fno-strict-aliasing -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)

Another option is using #pragma's in the source code to turn on "no-strict-aliasing" - I don't know what the preferences are on #pragma versus Makefile options. Personally, I prefer a #pragma in a case like this, as it ties the option closer to the code that requires it - but obviously the Linux code style preferences must be followed.


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux