public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* intrinsics and sign-conversion
@ 2023-03-17  9:22 Mathieu Malaterre
  2023-03-17 11:32 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Malaterre @ 2023-03-17  9:22 UTC (permalink / raw)
  To: gcc-help

Hi all,

I am trying to understand why I cannot get gcc to trigger a
sign-conversion warning on the following:

% cat tu.c
#include <immintrin.h>

extern unsigned int bar();

__m128i foo(__m128i a)
{
    return _mm_srai_epi64(a, bar());
}

On Debian/sid:

% gcc-12 -c  -mavx512vl -Wsign-conversion -Werror tu.c && echo "success"
success

Thanks,
-- 
Mathieu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: intrinsics and sign-conversion
  2023-03-17  9:22 intrinsics and sign-conversion Mathieu Malaterre
@ 2023-03-17 11:32 ` Jonathan Wakely
  2023-03-17 11:48   ` Mathieu Malaterre
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2023-03-17 11:32 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: gcc-help

On Fri, 17 Mar 2023 at 09:23, Mathieu Malaterre via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hi all,
>
> I am trying to understand why I cannot get gcc to trigger a
> sign-conversion warning on the following:
>
> % cat tu.c
> #include <immintrin.h>
>
> extern unsigned int bar();
>
> __m128i foo(__m128i a)
> {
>     return _mm_srai_epi64(a, bar());
> }
>
> On Debian/sid:
>
> % gcc-12 -c  -mavx512vl -Wsign-conversion -Werror tu.c && echo "success"
> success

It warns with -O1.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: intrinsics and sign-conversion
  2023-03-17 11:32 ` Jonathan Wakely
@ 2023-03-17 11:48   ` Mathieu Malaterre
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Malaterre @ 2023-03-17 11:48 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On Fri, Mar 17, 2023 at 12:32 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Fri, 17 Mar 2023 at 09:23, Mathieu Malaterre via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> >
> > Hi all,
> >
> > I am trying to understand why I cannot get gcc to trigger a
> > sign-conversion warning on the following:
> >
> > % cat tu.c
> > #include <immintrin.h>
> >
> > extern unsigned int bar();
> >
> > __m128i foo(__m128i a)
> > {
> >     return _mm_srai_epi64(a, bar());
> > }
> >
> > On Debian/sid:
> >
> > % gcc-12 -c  -mavx512vl -Wsign-conversion -Werror tu.c && echo "success"
> > success
>
> It warns with -O1.

Thanks ! I keep forgetting about this :(


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109173

-- 
Mathieu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-17 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17  9:22 intrinsics and sign-conversion Mathieu Malaterre
2023-03-17 11:32 ` Jonathan Wakely
2023-03-17 11:48   ` Mathieu Malaterre

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).