[Top][All Lists]

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

Re: [PATCH 5/5] evalstring: drop volatile on sigset

From: Chet Ramey
Subject: Re: [PATCH 5/5] evalstring: drop volatile on sigset
Date: Thu, 11 Aug 2016 14:20:12 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 8/11/16 12:12 PM, Mike Frysinger wrote:
> On 11 Aug 2016 11:45, Chet Ramey wrote:
>> On 8/11/16 8:30 AM, Mike Frysinger wrote:
>>> These variables are located on the stack and are never read/written
>>> directly by bash.  Instead, they're all accessed indirectly via the
>>> POSIX signal API.  Since POSIX does not require volatile, and bash
>>> itself doesn't require volatile, drop the volatile markings.  If we
>>> don't, you get a lot of warnings at build time as the POSIX API does
>>> not declare the prototypes with a volatile type.
>> I want the values usable across a potential longjmp() regardless of what
>> the compiler does and regardless of the underlying sigset_t type.  ISO C
>> says the value is technically undefined after a longjmp, however unlikely
>> it is that it will be modified.  volatile is the easiest way to accomplish
>> that.
> then can casts be added ?  building the code w/warnings is fairly verbose
> due to this issue (generates like ~30 lines of warnings iirc).

Sure, we'll try that.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]