[PATCH] D30538: Add documentation for -fno-strict-aliasing
simonbyrne updated this revision to Diff 100430. simonbyrne added a comment. Fix capitalisation. https://reviews.llvm.org/D30538 Files: docs/UsersManual.rst Index: docs/UsersManual.rst === --- docs/UsersManual.rst +++ docs/UsersManual.rst @@ -1098,6 +1098,14 @@ the behavior of sanitizers in the ``cfi`` group to allow checking of cross-DSO virtual and indirect calls. +.. option:: -f[no-]strict-aliasing + + Enables/disables the strict aliasing assumption, which assumes that + objects of different types do not share the same location in memory. + + NOTE: Unlike gcc, clang does not allow "type-punning" by writing and + reading from different union members without `-fno-strict-aliasing` + enabled. .. option:: -fstrict-vtable-pointers Index: docs/UsersManual.rst === --- docs/UsersManual.rst +++ docs/UsersManual.rst @@ -1098,6 +1098,14 @@ the behavior of sanitizers in the ``cfi`` group to allow checking of cross-DSO virtual and indirect calls. +.. option:: -f[no-]strict-aliasing + + Enables/disables the strict aliasing assumption, which assumes that + objects of different types do not share the same location in memory. + + NOTE: Unlike gcc, clang does not allow "type-punning" by writing and + reading from different union members without `-fno-strict-aliasing` + enabled. .. option:: -fstrict-vtable-pointers ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D30538: Add documentation for -fno-strict-aliasing
simonbyrne removed subscribers: jeroen.dobbelaere, carlosgalvezp. simonbyrne added a comment. i have no idea. It looks like it may have been resolved in https://reviews.llvm.org/rL303851? In that case, the NOTE should be removed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D30538/new/ https://reviews.llvm.org/D30538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D30538: Add documentation for -fno-strict-aliasing
simonbyrne created this revision. This is probably good to document, as the behaviour of `-fstrict-aliasing` differs from gcc in a quite important way (see https://bugs.llvm.org//show_bug.cgi?id=31928) . https://reviews.llvm.org/D30538 Files: docs/UsersManual.rst Index: docs/UsersManual.rst === --- docs/UsersManual.rst +++ docs/UsersManual.rst @@ -1098,6 +1098,14 @@ the behavior of sanitizers in the ``cfi`` group to allow checking of cross-DSO virtual and indirect calls. +.. option:: -f[no-]strict-aliasing + + Enables/disables the strict aliasing assumption, which assumes that + objects of different types do not share the same location in memory. + + NOTE: unlike gcc, clang does not allow "type-punning" by writing and + reading from different union members without `-fno-strict-aliasing` + enabled. .. option:: -fstrict-vtable-pointers Index: docs/UsersManual.rst === --- docs/UsersManual.rst +++ docs/UsersManual.rst @@ -1098,6 +1098,14 @@ the behavior of sanitizers in the ``cfi`` group to allow checking of cross-DSO virtual and indirect calls. +.. option:: -f[no-]strict-aliasing + + Enables/disables the strict aliasing assumption, which assumes that + objects of different types do not share the same location in memory. + + NOTE: unlike gcc, clang does not allow "type-punning" by writing and + reading from different union members without `-fno-strict-aliasing` + enabled. .. option:: -fstrict-vtable-pointers ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits