Strict aliasing is an assumption, made by the C or C++ compiler, that de-referencing pointers to objects of different types will never refer to the same memory location (i.e. they will not alias each other).
When asking about common undefined behavior in C, people sometimes refer to the strict aliasing rule. What are they talking …
c undefined-behavior strict-aliasing type-punningI used the following piece of code to read data from files as part of a larger program. double data_…
c optimization gcc pointers strict-aliasingI'm trying to fix two warnings when compiling a specific program using GCC. The warnings are: warning: dereferencing type-punned pointer …
c strict-aliasing type-punningI use a code where I cast an enum* to int*. Something like this: enum foo { ... } ... foo foobar; int *pi = …
c++ warnings strict-aliasingIn gcc-strict-aliasing-and-casting-through-a-union I asked whether anyone had encountered problems with union punning through pointers. So far, the answer seems to …
c gcc strict-aliasingDo you have any horror stories to tell? The GCC Manual recently added a warning regarding -fstrict-aliasing and casting a …
c gcc type-conversion unions strict-aliasingI'm using Beej's Guide to Networking and came across an aliasing issue. He proposes a function to return either the …
c sockets aliasing strict-aliasingNow we all sometimes have to work with binary data. In C++ we work with sequences of bytes, and since …
c++ c++11 language-lawyer strict-aliasing uint8tThe context of my problem is in network programming. Say I want to send messages over the network between two …
c networking portability strict-aliasingThe code below performs a fast inverse square root operation by some bit hacks. The algorithm was probably developed by …
c++ undefined-behavior gcc-warning strict-aliasing type-punning