BFS: Set -std=c++11 in bfs_shell c++flags for gcc >= 3
Required for use of non-static data member clang complains about this line in CheckVisitor.cpp: memset(&Control().stats, 0, sizeof(check_control::stats)); some explination: https://stackoverflow.com/questions/29359661/clang-error-invalid-use-of-non-static-data-member http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html Referencing a non-static data member inside a struct was retroactively made undefined in C++98 and only allowed on C++11 even though gcc permits the code to compile. No change to functionality intended. Thanks Jérôme and waddlesplash Change-Id: Ic6bc332cf2796c709584488c60a067cd341bf894 Reviewed-on: https://review.haiku-os.org/c/1503 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
0dbb417d43
commit
a9d549c969
@ -18,8 +18,15 @@ DEFINES += HAIKU_BUILD_COMPATIBILITY_H ;
|
||||
}
|
||||
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
|
||||
local c++flags = ;
|
||||
if $(HOST_GCC_VERSION[1]) >= 3 {
|
||||
c++flags += -std=c++11 ;
|
||||
}
|
||||
|
||||
SubDirCcFlags $(defines) -Wno-multichar ;
|
||||
SubDirC++Flags $(defines) -Wno-multichar -fno-rtti ;
|
||||
SubDirC++Flags $(defines) $(c++flags) -Wno-multichar -fno-rtti ;
|
||||
}
|
||||
|
||||
# platform specific libraries
|
||||
|
Loading…
Reference in New Issue
Block a user