I wonder if gcc would accept a contribution where someone wrote a
patch to introduce an attribute for register variables instead of
having the register + __asm thing. Sounds way less confusing to me

best regards,
Julian

On Mon, Dec 30, 2024 at 9:39 AM LIU Hao <lh_mo...@126.com> wrote:
>
> 在 2024-12-30 01:57, Jeremy Drake via Mingw-w64-public 写道:
> > I did some playing with godbolt.org.  It seems OK with `register` with
> > `__asm__`: https://godbolt.org/z/xrdn3rG45
> > but gives an error without:
> > error: ISO C++17 does not allow 'register' storage class specifier
> > [-Wregister]
> > https://godbolt.org/z/cMbhhffhs
> > (of course, it also gives an error for file-scoped register variable too).
>
> The combination of `register` and `asm` is an extension and can't be 
> deprecated unless there is an
> alternative.
>
>
> --
> Best regards,
> LIU Hao
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to