Apply unmerged pull request from upstream:
    
8286562: GCC 12 reports some compiler warnings
https://github.com/openjdk/jdk11u-dev/pull/3091

Index: src/hotspot/share/utilities/globalDefinitions.hpp
--- src/hotspot/share/utilities/globalDefinitions.hpp.orig
+++ src/hotspot/share/utilities/globalDefinitions.hpp
@@ -681,9 +681,10 @@ inline BasicType char2type(char c) {
 extern char type2char_tab[T_CONFLICT+1];     // Map a BasicType to a jchar
 inline char type2char(BasicType t) { return (uint)t < T_CONFLICT+1 ? type2char_tab[t] : 0; }
 extern int type2size[T_CONFLICT+1];         // Map BasicType to result stack elements
-extern const char* type2name_tab[T_CONFLICT+1];     // Map a BasicType to a jchar
-inline const char* type2name(BasicType t) { return (uint)t < T_CONFLICT+1 ? type2name_tab[t] : NULL; }
+extern const char* type2name_tab[T_CONFLICT+1];     // Map a BasicType to a char*
 extern BasicType name2type(const char* name);
+
+const char* type2name(BasicType t);
 
 // Auxiliary math routines
 // least common multiple
