Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8149187

no compile-time warnings are enabled for adlc compilation on linux/mac

XMLWordPrintable

      adding warning to adlc sources doesn't make gcc to report them. although on other platforms, compilers report warnings.

      diff -r 2bfeb58686e4 -r 2df72fc5f78a src/share/vm/adlc/main.cpp
      --- a/src/share/vm/adlc/main.cpp Thu Dec 17 16:12:58 2015 +0300
      +++ b/src/share/vm/adlc/main.cpp Sun Feb 07 21:45:21 2016 +0300
      @@ -24,6 +24,7 @@
       
       // MAIN.CPP - Entry point for the Architecture Description Language Compiler
       #include "adlc.hpp"
      +#define FOO DEFAULT_FOO
       
       //------------------------------Prototypes-------------------------------------
       static void usage(ArchDesc& AD); // Print usage message and exit
      @@ -43,10 +44,16 @@
         }
         return basename;
       }
      -
      +static void foo() { }
       //------------------------------main-------------------------------------------
       int main(int argc, char *argv[])
       {
      + int unused;
      + int a;
      + int b=0;
      + int *p = NULL;
      + if (b=a) { a++; }
      + if ((a==b) == 2) { a=*p; }
         ArchDesc AD; // Architecture Description object
         globalAD = &AD;

            Unassigned Unassigned
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: