]> git.pond.sub.org Git - empserver/commit - configure.ac
configure: Use -fno-strict-aliasing -fno-strict-overflow
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 18 Oct 2015 15:48:15 +0000 (17:48 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 5 Dec 2015 12:19:38 +0000 (13:19 +0100)
commit3f86dd2ecf962be59e9e79eef83709307c35272f
treeada7cc4534498289d575c992e365a5d3f3536b13
parent6e80cf103f1e4e46efccbd3ea3454151b83b08ec
configure: Use -fno-strict-aliasing -fno-strict-overflow

Contemporary compilers can squeeze out some extra performance by
assuming the program never executes code that has undefined behavior
according to the C standard.  Unfortunately, this can break programs.
Pointing out that these programs are non-conforming is as correct as
it is unhelpful, at least as long as the compiler is unable to
diagnose the non-conformingness.

Since keeping our programs working is a lot more important to us than
running them as fast as possible, forbid some assumptions that are
known to break real-world programs:

* Aliasing: perfectly clean programs don't engage in type-punning, and
  perfectly conforming programs do it only in full accordance with the
  standard's (subtle!) aliasing rules.  Neither kind of perfection is
  realistic for us, therefore -fno-strict-aliasing.

* Signed integer overflow: perfectly clean programs won't ever do
  signed integer arithmetic that overflows.  This is an imperfect
  program, therefore -fno-strict-overflow.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
configure.ac