Re: [PATCH 2/2] parse-options: use and require int pointer for OPT_CMDMODE

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

 



On Sat, Sep 09, 2023 at 11:14:20PM +0200, René Scharfe wrote:
Some uses of OPT_CMDMODE provide a pointer to an enum.  It is
dereferenced as an int pointer in parse-options.c::get_value().  These
two types are incompatible, though

s/are/may be/ - c.f. https://en.cppreference.com/w/c/language/enum

-- the storage size of an enum can vary between platforms.

here's a completely different perspective:
this is merely a theoretical problem, right? gcc for example won't actually use non-ints unless -fshort-enums is supplied. so how about simply adding a (configure) test to ensure that there is actually no problem, and calling it a day?

regards




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux