public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Ovidiu Panait <ovpanait@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] microblaze: use strverscmp() in MICROBLAZE_VERSION_COMPARE()
Date: Mon, 24 Oct 2022 09:18:56 -0600	[thread overview]
Message-ID: <b4028c12-0706-4986-5efd-b2074aadfb16@gmail.com> (raw)
In-Reply-To: <20221016181531.225006-1-ovpanait@gmail.com>


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	other threads:[~2022-10-24 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 18:15 Ovidiu Panait
2022-10-24 15:18 ` Jeff Law [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4028c12-0706-4986-5efd-b2074aadfb16@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ovpanait@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).