gcc 7.3.1 build - warnings as errors in harfbuzz (original) (raw)
Erik Joelsson erik.joelsson at oracle.com
Wed Oct 10 16:07:59 UTC 2018
- Previous message (by thread): gcc 7.3.1 build - warnings as errors in harfbuzz
- Next message (by thread): gcc 7.3.1 build - warnings as errors in harfbuzz
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I think that's fine. This is the granularity we have.
/Erik
On 2018-10-10 09:02, Baesken, Matthias wrote:
Hi Erik, so I think I could disable the warning here :
Awt2dLibraries.gmk --------------------------------- _$(eval $(call SetupJdkLibrary, BUILDLIBFONTMANAGER, _ _NAME := fontmanager, _ .... _WARNINGSASERRORSxlc := false, _ _DISABLEDWARNINGSgcc := format-truncation sign-compare int-to-pointer-cast _ _type-limits missing-field-initializers implicit-fallthrough _ _strict-aliasing undef unused-function, _ _DISABLEDWARNINGSCXXgcc := format-truncation reorder delete-non-virtual-dtor strict-overflow _ _maybe-uninitialized, _ ... (add format-truncation for gcc in the warning-disabling section). However this would disable it also for other versions of gcc where the issue never showed up . Do you think this is fine (and safe for older gcc) ? Best regards, Matthias -----Original Message----- From: Erik Joelsson <erik.joelsson at oracle.com> Sent: Mittwoch, 10. Oktober 2018 17:33 To: Baesken, Matthias <matthias.baesken at sap.com>; 'build- dev at openjdk.java.net' <build-dev at openjdk.java.net> Subject: Re: gcc 7.3.1 build - warnings as errors in harfbuzz
In this case, disabling the warning seems like the right thing to do. /Erik
On 2018-10-10 06:14, Baesken, Matthias wrote: Hello , when compiling jdk/jdk with gcc 7.3.1 on linux x8664 (or also on linux ppc64) I run into this build error :
/openjdk/jdkjustclone/jdk/src/java.desktop/share/native/libfontmanag er/harfbuzz/hb-common.cc: In function 'void hbvariationtostring(hbvariationt*, char*, unsigned int)': /openjdk/jdkjustclone/jdk/src/java.desktop/share/native/libfontmanag er/harfbuzz/hb-common.cc:1066:27: error: '%g' directive output between 1 and 18446744073709551615 bytes may cause result to exceed 'INTMAX' [- Werror=format-truncation=] len += MAX (0, snprintf (s + len, ARRAYLENGTH (s) - len, "%g", variation- value)); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ /openjdk/jdkjustclone/jdk/src/java.desktop/share/native/libfontmanag er/harfbuzz/hb-common.cc:1066:27: note: assuming directive output of 2147488582 bytes cc1plus: all warnings being treated as errors (build is a product - build) Setting –disable-warnings-as-errors works as a workaround , but of course this is not really what we want to do . Fixing in the harfbuzz sources in OpenJDk might be also not so nice because it would clash with imports of new versions of harfbuzz . Do you think we could disable the specific warning for the library compilation ? Any other great suggestions đŸ˜‰ ?
Thanks, Matthias
- Previous message (by thread): gcc 7.3.1 build - warnings as errors in harfbuzz
- Next message (by thread): gcc 7.3.1 build - warnings as errors in harfbuzz
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]