8022263: use same Clang warnings on BSD as on Linux jdk8u252-b05 jdk8u262-b00

Tue, 07 Jan 2014 14:26:12 -0800

author
twisti
date
Tue, 07 Jan 2014 14:26:12 -0800
changeset 9846
9003f35baaa0
parent 9845
68172de2a0d7
child 9847
b4fd7e078c54

8022263: use same Clang warnings on BSD as on Linux
Reviewed-by: kvn, iveresov

make/bsd/makefiles/gcc.make file | annotate | diff | comparison | revisions
src/share/vm/adlc/archDesc.cpp file | annotate | diff | comparison | revisions
src/share/vm/adlc/main.cpp file | annotate | diff | comparison | revisions
src/share/vm/adlc/output_c.cpp file | annotate | diff | comparison | revisions
src/share/vm/prims/forte.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/make/bsd/makefiles/gcc.make	Thu Feb 27 06:41:35 2020 +0000
     1.2 +++ b/make/bsd/makefiles/gcc.make	Tue Jan 07 14:26:12 2014 -0800
     1.3 @@ -260,14 +260,13 @@
     1.4    WARNINGS_ARE_ERRORS += -Wno-empty-body
     1.5  endif
     1.6  
     1.7 -WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef
     1.8 +WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
     1.9  
    1.10 -ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
    1.11 +ifeq ($(USE_CLANG),)
    1.12    # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
    1.13    # conversions which might affect the values. Only enable it in earlier versions.
    1.14 -  WARNING_FLAGS = -Wunused-function
    1.15 -  ifeq ($(USE_CLANG),)
    1.16 -    WARNING_FLAGS += -Wconversion
    1.17 +  ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
    1.18 +    WARNINGS_FLAGS += -Wconversion
    1.19    endif
    1.20  endif
    1.21  
     2.1 --- a/src/share/vm/adlc/archDesc.cpp	Thu Feb 27 06:41:35 2020 +0000
     2.2 +++ b/src/share/vm/adlc/archDesc.cpp	Tue Jan 07 14:26:12 2014 -0800
     2.3 @@ -43,32 +43,6 @@
     2.4    return result;
     2.5  }
     2.6  
     2.7 -// Utilities to characterize effect statements
     2.8 -static bool is_def(int usedef) {
     2.9 -  switch(usedef) {
    2.10 -  case Component::DEF:
    2.11 -  case Component::USE_DEF: return true; break;
    2.12 -  }
    2.13 -  return false;
    2.14 -}
    2.15 -
    2.16 -static bool is_use(int usedef) {
    2.17 -  switch(usedef) {
    2.18 -  case Component::USE:
    2.19 -  case Component::USE_DEF:
    2.20 -  case Component::USE_KILL: return true; break;
    2.21 -  }
    2.22 -  return false;
    2.23 -}
    2.24 -
    2.25 -static bool is_kill(int usedef) {
    2.26 -  switch(usedef) {
    2.27 -  case Component::KILL:
    2.28 -  case Component::USE_KILL: return true; break;
    2.29 -  }
    2.30 -  return false;
    2.31 -}
    2.32 -
    2.33  //---------------------------ChainList Methods-------------------------------
    2.34  ChainList::ChainList() {
    2.35  }
     3.1 --- a/src/share/vm/adlc/main.cpp	Thu Feb 27 06:41:35 2020 +0000
     3.2 +++ b/src/share/vm/adlc/main.cpp	Tue Jan 07 14:26:12 2014 -0800
     3.3 @@ -29,7 +29,6 @@
     3.4  static void  usage(ArchDesc& AD);          // Print usage message and exit
     3.5  static char *strip_ext(char *fname);       // Strip off name extension
     3.6  static char *base_plus_suffix(const char* base, const char *suffix);// New concatenated string
     3.7 -static char *prefix_plus_base_plus_suffix(const char* prefix, const char* base, const char *suffix);// New concatenated string
     3.8  static int get_legal_text(FileBuff &fbuf, char **legal_text); // Get pointer to legal text
     3.9  
    3.10  ArchDesc* globalAD = NULL;      // global reference to Architecture Description object
     4.1 --- a/src/share/vm/adlc/output_c.cpp	Thu Feb 27 06:41:35 2020 +0000
     4.2 +++ b/src/share/vm/adlc/output_c.cpp	Tue Jan 07 14:26:12 2014 -0800
     4.3 @@ -35,23 +35,6 @@
     4.4    return false;
     4.5  }
     4.6  
     4.7 -static bool is_use(int usedef) {
     4.8 -  switch(usedef) {
     4.9 -  case Component::USE:
    4.10 -  case Component::USE_DEF:
    4.11 -  case Component::USE_KILL: return true; break;
    4.12 -  }
    4.13 -  return false;
    4.14 -}
    4.15 -
    4.16 -static bool is_kill(int usedef) {
    4.17 -  switch(usedef) {
    4.18 -  case Component::KILL:
    4.19 -  case Component::USE_KILL: return true; break;
    4.20 -  }
    4.21 -  return false;
    4.22 -}
    4.23 -
    4.24  // Define  an array containing the machine register names, strings.
    4.25  static void defineRegNames(FILE *fp, RegisterForm *registers) {
    4.26    if (registers) {
     5.1 --- a/src/share/vm/prims/forte.cpp	Thu Feb 27 06:41:35 2020 +0000
     5.2 +++ b/src/share/vm/prims/forte.cpp	Tue Jan 07 14:26:12 2014 -0800
     5.3 @@ -625,7 +625,7 @@
     5.4  #ifdef __APPLE__
     5.5  // XXXDARWIN: Link errors occur even when __attribute__((weak_import))
     5.6  // is added
     5.7 -#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) (0)
     5.8 +#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) ((void) 0)
     5.9  #else
    5.10  void    collector_func_load(char* name,
    5.11                              void* null_argument_1,

mercurial