Needed on gcc 6 for one of the files
Signed-off-by: Nadav Har'El
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 63427bf..530e9a5 100644
--- a/Makefile
+++ b/Makefile
@@ -502,6 +502,8 @@ $(out)/bsd/sys/netinet/in_rmx.o:
COMMON+=-fno-strict-aliasing
An enum class can be explicitly converted to the underlying int,
using a static_cast, but this conversion does not happen
implicitly, and gcc 6 is even stricter about this than the
previous versions of the compiler.
Signed-off-by: Nadav Har'El
---
arch/x64/apic.hh | 6 +++---
1 file changed, 3 i
Gcc 6 became much more strict about strict aliasing: It now can catch
and warn about more illegal cases of type punning, and uses this assumption
more in optimizations, which can lead to incorrect code generation where
this assumption is violated.
In files which contain such violations, we need to
Our pthread_t type was a pointer, while in Linux it was an unsigned long.
This was ok for binary compatibility, because both have the same size,
but the unnecessary difference can cause problems in source code - and
does cause problems for Gcc 6: In Gcc 6's header file, they
have the code thread::
Gcc 6 complains when a static template instance is created, but never used -
just like it complains about regular static functions which are not used.
There was no reason in the first place for these functions to be a template.
They can just be run-of-the-mill overloading of the same function name
Gcc 6 does not like an unsized array in a union. Fortunately, there
was no real reason for this trickery in the first place - a
traditional cast to char* works just as well.
Signed-off-by: Nadav Har'El
---
tools/cpiod/cpio.cc | 18 +++---
1 file changed, 7 insertions(+), 11 deletions
Signed-off-by: Nadav Har'El
---
core/mempool.cc | 1 -
1 file changed, 1 deletion(-)
diff --git a/core/mempool.cc b/core/mempool.cc
index 0fbd857..50c938f 100644
--- a/core/mempool.cc
+++ b/core/mempool.cc
@@ -11,7 +11,6 @@
#include
#include
#include
-#include
#include
#include
#incl
Add two #include statements that are necessary to declare functions
we use (expf and std::accumulate). In older compilers somehow we got
by without these #include (perhaps other header files included them),
but in gcc 6, we can no longer compile without explicitly including
these header files.
Sig
ide_drive's constructor contained an obvious typo, not setting the
_dev member as intended but rather copying it from itself (!).
Older compilers happily accepted this error, but gcc 6 refused to
accept this, and found a bug.
Signed-off-by: Nadav Har'El
---
drivers/ide.cc | 2 +-
1 file changed,
The "&" character was strangely missing in the original code in the
familiar idiom for calculating the offset of a field in a structure.
I don't know how this code ever worked before, but it compiled and
nobody noticed.
In gcc 6, this error caused the compiler to complain about an illegal
conversi
According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59281 gcc 6 no
longer allows to use enum class as constructor priorities, as we did in
include/osv/prio.hh. Constructor priorities must be integers, and enum
class do not support conversion to int.
The solution is to go back to old-style en
11 matches
Mail list logo