Hi, when switching from avr-gcc 4.1.2 to 4.8.1 (avr8-gnu-toolchain 3.4.5.1522 [1]) some code compiles with "dereferencing type-punned pointer" warnings.
For example, if one includes the SHT21 components, then one gets something like tinyos-main/tos/chips/sht21/Sht21TempLogicP.nc: In function 'Sht21TempLogicP__signalDone__runTask': tinyos-main/tos/chips/sht21/Sht21TempLogicP.nc:165:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] oldTempData = *((nx_uint16_t*)buffer); ^ Can these warnings be ignored, or is it better to fix the corresponding lines of code? - e.g. analogously to oldTempData = ((uint16_t)buffer[0] << 8) | buffer[1]; Best regards Michael [1] http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4.5/ _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help