Re: [PATCH] ash/hush: implement -d DELIM option for `read`

2017-08-07 Thread Kang-Che Sung
On Mon, Aug 7, 2017 at 6:18 PM, Johannes Schindelin wrote: > The POSIX standard only requires the `read` builtin to handle `-r`: > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html > > However, Bash introduced the option `-d ` to override IFS for >

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Emmanuel Deloget
On Mon, Aug 7, 2017 at 10:37 PM, Emmanuel Deloget wrote: > > > > On Mon, Aug 7, 2017 at 9:46 PM, Johannes Schindelin > wrote: >> >> Hi Denys, >> >> On Mon, 7 Aug 2017, Denys Vlasenko wrote: >> >> > On Mon, Aug 7, 2017 at 12:09 PM, Johannes Schindelin

[PATCH v2] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Johannes Schindelin
When compiling xz_dec_stream.c with GCC (at least with versions 5.4.0 and 7.1.0), it complains thusly: In function 'dec_stream_footer': error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] if

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Johannes Schindelin
Hi Emmanuel, On Mon, 7 Aug 2017, Emmanuel Deloget wrote: > On Mon, Aug 7, 2017 at 12:25 PM, Lauri Kasanen wrote: > > On Mon, 7 Aug 2017 12:09:45 +0200 (CEST) > > Johannes Schindelin wrote: > >> Meaning: GCC gets this all wrong and should not complain.

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Emmanuel Deloget
On Mon, Aug 7, 2017 at 9:46 PM, Johannes Schindelin < johannes.schinde...@gmx.de> wrote: > Hi Denys, > > On Mon, 7 Aug 2017, Denys Vlasenko wrote: > > > On Mon, Aug 7, 2017 at 12:09 PM, Johannes Schindelin > > wrote: > > > When compiling xz_dec_stream.c with GCC

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Johannes Schindelin
Hi, On Mon, 7 Aug 2017, Johannes Schindelin wrote: > On Mon, 7 Aug 2017, Denys Vlasenko wrote: > > > On Mon, Aug 7, 2017 at 12:09 PM, Johannes Schindelin > > wrote: > > > When compiling xz_dec_stream.c with GCC 7.1.0, it complains thusly: > > > > > > In

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Johannes Schindelin
Hi Denys, On Mon, 7 Aug 2017, Denys Vlasenko wrote: > On Mon, Aug 7, 2017 at 12:09 PM, Johannes Schindelin > wrote: > > When compiling xz_dec_stream.c with GCC 7.1.0, it complains thusly: > > > > In function 'dec_stream_footer': > > error:

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Denys Vlasenko
On Mon, Aug 7, 2017 at 12:09 PM, Johannes Schindelin wrote: > When compiling xz_dec_stream.c with GCC 7.1.0, it complains thusly: > > In function 'dec_stream_footer': > error: dereferencing type-punned pointer will break strict-aliasing >

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Emmanuel Deloget
Hello, On Mon, Aug 7, 2017 at 12:25 PM, Lauri Kasanen wrote: > On Mon, 7 Aug 2017 12:09:45 +0200 (CEST) > Johannes Schindelin wrote: >> Meaning: GCC gets this all wrong and should not complain. So let's force >> it to be quiet for a couple of lines. >

Re: [PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Lauri Kasanen
On Mon, 7 Aug 2017 12:09:45 +0200 (CEST) Johannes Schindelin wrote: > Meaning: GCC gets this all wrong and should not complain. So let's force > it to be quiet for a couple of lines. I believe this is both wrong and dangerous. If gcc warns about it, it will also very

[PATCH] ash/hush: implement -d DELIM option for `read`

2017-08-07 Thread Johannes Schindelin
The POSIX standard only requires the `read` builtin to handle `-r`: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html However, Bash introduced the option `-d ` to override IFS for just one invocation, and it is quite useful. It is also super easy to implement in BusyBox' ash,

[PATCH] Silence misguided GCC warning about alignment issues

2017-08-07 Thread Johannes Schindelin
When compiling xz_dec_stream.c with GCC 7.1.0, it complains thusly: In function 'dec_stream_footer': error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] if (xz_crc32(s->temp.buf + 4, 6, 0) !=