On 10/16/22 12:15, Ovidiu Panait via Gcc-patches wrote:
Currently, combining '-mxl-multiply-high' with -mcpu=v11.0 produces the
following bogus warning:

   echo "int main(){}" | ./microblazeel-linux-gnu-gcc -mxl-multiply-high \
   -mno-xl-soft-mul -mcpu=v11.0 -nostdlib -x c -
   warning: '-mxl-multiply-high' can be used only with '-mcpu=v6.00.a' or 
greater

Since strcasecmp() doesn't properly compare single-digit cpu versions with
double-digit versions, switch MICROBLAZE_VERSION_COMPARE() to use strverscmp()
instead.

        * config/microblaze/microblaze.cc (MICROBLAZE_VERSION_COMPARE): Use
        strverscmp() to fix bogus warnings when passing multi-digit -mcpu
        versions on the command line.

But strverscmp doesn't ignore character case.  ISTM that you need to canonicalize the case first if you're going to use strverscmp.


Jeff


Reply via email to