Skip to content

Commit

Permalink
8300169: Build failure with clang-15
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, prr
  • Loading branch information
DamonFool committed Jan 18, 2023
1 parent d918042 commit 15a9186
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
4 changes: 3 additions & 1 deletion make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -166,8 +166,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_clang_g1ParScanThreadState.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_g1YoungGCPostEvacuateTasks.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_management.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_notificationThread.cpp := bitwise-instead-of-logical, \
DISABLED_WARNINGS_clang_os_posix.cpp := mismatched-tags missing-field-initializers, \
DISABLED_WARNINGS_clang_postaloc.cpp := tautological-undefined-compare, \
DISABLED_WARNINGS_clang_serviceThread.cpp := bitwise-instead-of-logical, \
DISABLED_WARNINGS_clang_vm_version_x86.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_zTracer.cpp := undefined-var-template, \
DISABLED_WARNINGS_xlc := $(DISABLED_WARNINGS_xlc), \
Expand Down
5 changes: 3 additions & 2 deletions make/modules/java.base/lib/CoreLibraries.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -140,6 +140,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
$(LIBZ_CFLAGS), \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc_zip_util.c := unused-function, \
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
Expand Down Expand Up @@ -211,7 +212,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := unused-function, \
DISABLED_WARNINGS_clang := format-nonliteral, \
DISABLED_WARNINGS_clang := format-nonliteral deprecated-non-prototype, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBZ_LIBS), \
Expand Down
6 changes: 4 additions & 2 deletions make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -147,7 +147,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
DISABLED_WARNINGS_gcc_Region.c := maybe-uninitialized, \
DISABLED_WARNINGS_gcc_SurfaceData.c := unused-value, \
DISABLED_WARNINGS_gcc_TransformHelper.c := sign-compare, \
DISABLED_WARNINGS_clang_awt_ImagingLib.c := sign-compare, \
DISABLED_WARNINGS_clang_awt_ImagingLib.c := sign-compare deprecated-non-prototype, \
DISABLED_WARNINGS_clang_awt_parseImage.c := sign-compare, \
DISABLED_WARNINGS_clang_debug_mem.c := extern-initializer format-nonliteral, \
DISABLED_WARNINGS_clang_debug_trace.c := format-nonliteral, \
Expand Down Expand Up @@ -757,6 +757,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough maybe-uninitialized, \
DISABLED_WARNINGS_gcc_splashscreen_impl.c := implicit-fallthrough sign-compare unused-function, \
DISABLED_WARNINGS_gcc_splashscreen_sys.c := type-limits unused-result, \
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare, \
Expand Down Expand Up @@ -829,6 +830,7 @@ ifeq ($(call isTargetOs, macosx), true)
DISABLED_WARNINGS_clang_ImageSurfaceData.m := enum-conversion parentheses-equality, \
DISABLED_WARNINGS_clang_MTLBlitLoops.m := pointer-arith, \
DISABLED_WARNINGS_clang_MTLPipelineStatesStorage.m := semicolon-before-method-body, \
DISABLED_WARNINGS_clang_MTLRenderer.m := gnu-folding-constant, \
DISABLED_WARNINGS_clang_MTLVertexCache.m := pointer-arith, \
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/oops/generateOopMap.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1732,7 +1732,7 @@ void GenerateOopMap::ppop(CellTypeState *out) {
}

void GenerateOopMap::ppush1(CellTypeState in) {
assert(in.is_reference() | in.is_value(), "sanity check");
assert(in.is_reference() || in.is_value(), "sanity check");
push(in);
}

Expand Down
4 changes: 2 additions & 2 deletions src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -59,7 +59,7 @@
GET_CPRINTERDIALOG_CLASS_RETURN(ret); \
GET_FIELD_RETURN(sjm_printerJob, sjc_CPrinterDialog, "fPrinterJob", "Lsun/lwawt/macosx/CPrinterJob;", ret);

static NSPrintInfo* createDefaultNSPrintInfo();
static NSPrintInfo* createDefaultNSPrintInfo(JNIEnv* env, jstring printer);

static void makeBestFit(NSPrintInfo* src);

Expand Down
2 changes: 1 addition & 1 deletion src/java.desktop/share/native/libharfbuzz/hb-meta.hh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ template <> struct hb_int_max<signed long long> : hb_integral_constant<s
template <> struct hb_int_max<unsigned long long> : hb_integral_constant<unsigned long long, ULLONG_MAX> {};
#define hb_int_max(T) hb_int_max<T>::value

#if defined(__GNUC__) && __GNUC__ < 5
#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
#define hb_is_trivially_copyable(T) __has_trivial_copy(T)
#define hb_is_trivially_copy_assignable(T) __has_trivial_assign(T)
#define hb_is_trivially_constructible(T) __has_trivial_constructor(T)
Expand Down

1 comment on commit 15a9186

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.