RE: [PATCH v2] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-27 Thread Hu, Jiangping
> In addition to Segher's comments, I wonder if it would be better > to pass &opts->x_flag_align_foo and &opts->x_str_align_jumps to > check_alignment_argument and do the check there instead. > The condition for whether to do this would then be: > > align_result.length () == 1 && align_result[0]

Re: [PATCH v2] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-24 Thread Richard Sandiford
Hu Jiangping writes: > Thanks, Richard! > > I think your suggestion is very good, so I made a new patch. > > v2: at a high level handles -falign-foo=0 like -falign-foo > v1: at the target level overides the -falign-foo=0 option values > > Obviously, v2 is better than v1. In addition, anthor option

Re: [PATCH v2] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-24 Thread Segher Boessenkool
Hi! Just some random comments... On Thu, Jul 23, 2020 at 04:44:21PM +0800, Hu Jiangping wrote: > + // fix PR96247 /* See PR96247. */ > + if (0 == atoi(arg)) { Either if (atoi (arg) == 0) { blalalala or if (!atoi (arg)) { blala

RE: [PATCH v2] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-24 Thread Hu, Jiangping
Add CC to Richard. > Thanks, Richard! > > I think your suggestion is very good, so I made a new patch. > > v2: at a high level handles -falign-foo=0 like -falign-foo > v1: at the target level overides the -falign-foo=0 option values > > Obviously, v2 is better than v1. In addition, anthor optio

[PATCH v2] driver: fix a problem with implementation of -falign-foo=0 [PR96247]

2020-07-23 Thread Hu Jiangping
Thanks, Richard! I think your suggestion is very good, so I made a new patch. v2: at a high level handles -falign-foo=0 like -falign-foo v1: at the target level overides the -falign-foo=0 option values Obviously, v2 is better than v1. In addition, anthor option to reject 0 that discussed in the