Re: [C++] EOF has a location

2020-05-12 Thread Rainer Orth
Hi Jakub, > On Fri, May 08, 2020 at 11:48:34AM -0400, Nathan Sidwell wrote: >> 2020-05-08 Nathan Sidwell >> >> gcc/cp/ >> * parser.c (cp_lexer_set_source_position_from_token): EOF has a >> location too. > > This change: > >> --- c/gcc/cp/parser.c >> +++ w/gcc/cp/parser.c >> @@ -

Re: [C++] EOF has a location

2020-05-12 Thread Jakub Jelinek via Gcc-patches
On Fri, May 08, 2020 at 11:48:34AM -0400, Nathan Sidwell wrote: > 2020-05-08 Nathan Sidwell > > gcc/cp/ > * parser.c (cp_lexer_set_source_position_from_token): EOF has a > location too. This change: > --- c/gcc/cp/parser.c > +++ w/gcc/cp/parser.c > @@ -895,10 +895,7 @@ cp_le

[C++] EOF has a location

2020-05-08 Thread Nathan Sidwell
There's no need to special-case EOF's location. For the complete file we give it a legitimate location. And for deferred parses we now zap a temporary EOF onto the next token, so we can just use its location anyway. pushed to master. nathan -- Nathan Sidwell 2020-05-08 Nathan Sidwell