Re: arch_prctl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Xi,

On Fri, Aug 23, 2024 at 03:35:39PM GMT, Xi Ruoyao wrote:
> On Thu, 2024-08-22 at 21:24 +0200, Alejandro Colomar wrote:
> > > ...except transparent unions are C-only, so we'd need something else
> > > for C++ if we went with this for C.
> > 
> > Why don't they have transparent unions in C++?  Is it just that nobody
> > cared to implement them?  Or do they have inherent problems there?
> 
> In C++ you can write something like
> 
> union X {
> 	int x;
> 	float y;
> 
> 	X(int _x) : x(_x) {}
> 	X(float _y) : y(_y) {}
> };
> 
> anyway.

But by not having transparent unions, C++ will reject valid C code.
This ultimately means that C++ won't be able to include a header that
provides arch_prctl(2).

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux