Re: [PATCH] rs6000: avoid peeking eof after __vector

2022-05-09 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > Hi! > > On Mon, May 09, 2022 at 06:19:45PM +0800, Jiufu Guo wrote: >> There is a rare corner case: where vector is followed only by one >> valid identifer and the ";" which is near the end of the file. >> >> Like the case in PR101168: >> using vdbl = __vector double

Re: [PATCH] rs6000: avoid peeking eof after __vector

2022-05-09 Thread Segher Boessenkool
Hi! On Mon, May 09, 2022 at 06:19:45PM +0800, Jiufu Guo wrote: > There is a rare corner case: where vector is followed only by one > valid identifer and the ";" which is near the end of the file. > > Like the case in PR101168: > using vdbl = __vector double; > #define BREAK 1 > > For this case,

[PATCH] rs6000: avoid peeking eof after __vector

2022-05-09 Thread Jiufu Guo via Gcc-patches
Hi! This patch is based on: https://gcc.gnu.org/pipermail/gcc-patches/2022-March/592102.html And update the 'function comment' to make it consistent with code. There is a rare corner case: where vector is followed only by one valid identifer and the ";" which is near the end of the file. Like th

Re: [PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-22 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > Hi! > > On Tue, Mar 22, 2022 at 01:50:39PM +0800, Jiufu Guo wrote: >> Segher Boessenkool writes: >> > On Mon, Mar 21, 2022 at 02:14:08PM -0400, David Edelsohn wrote: >> >> On Mon, Mar 21, 2022 at 5:13 AM Jiufu Guo wrote: >> >> > There is a rare corner case: where __

Re: [PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-22 Thread Segher Boessenkool
Hi! On Tue, Mar 22, 2022 at 01:50:39PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > On Mon, Mar 21, 2022 at 02:14:08PM -0400, David Edelsohn wrote: > >> On Mon, Mar 21, 2022 at 5:13 AM Jiufu Guo wrote: > >> > There is a rare corner case: where __vector is followed only with ";" > >>

Re: [PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-21 Thread Jiufu Guo via Gcc-patches
Hi! Segher Boessenkool writes: > On Mon, Mar 21, 2022 at 02:14:08PM -0400, David Edelsohn wrote: >> On Mon, Mar 21, 2022 at 5:13 AM Jiufu Guo wrote: >> > There is a rare corner case: where __vector is followed only with ";" >> > and near the end of the file. > >> This is okay. Maybe a tweak t

Re: [PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-21 Thread Segher Boessenkool
On Mon, Mar 21, 2022 at 02:14:08PM -0400, David Edelsohn wrote: > On Mon, Mar 21, 2022 at 5:13 AM Jiufu Guo wrote: > > There is a rare corner case: where __vector is followed only with ";" > > and near the end of the file. > This is okay. Maybe a tweak to the comment, see below. This whole funct

Re: [PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-21 Thread David Edelsohn via Gcc-patches
On Mon, Mar 21, 2022 at 5:13 AM Jiufu Guo wrote: > > Hi! > > There is a rare corner case: where __vector is followed only with ";" > and near the end of the file. > > Like the case in PR101168: > using vdbl = __vector double; > #define BREAK 1 > > For this case, "__vector double" is not followed

[PATCH]rs6000: avoid peeking eof after __vector keyword

2022-03-21 Thread Jiufu Guo via Gcc-patches
Hi! There is a rare corner case: where __vector is followed only with ";" and near the end of the file. Like the case in PR101168: using vdbl = __vector double; #define BREAK 1 For this case, "__vector double" is not followed by a PP_NAME, it is followed by CPP_SEMICOLON and then EOF. In this