Re: [PATCH] don't allow newlines inside string literals

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

 



On Sun, Dec 09, 2018 at 02:46:40AM +0000, Ramsay Jones wrote:
> On 08/12/2018 15:10, Luc Van Oostenryck wrote:
> > @@ -580,9 +580,9 @@ static int eat_string(int next, stream_t *stream, enum token_type type)
> >  		len++;
> >  		if (next == '\n') {
> >  			warning(stream_pos(stream),
> > -				"Newline in string or character constant");
> > -			if (delim == '\'') /* assume it's lost ' */
> > -				break;
> > +				"missing delimitator %c", delim);
> 
> s/delimitator/delimiter/

Mmmm, yes :)
I had to have 'delimiter' and 'terminator' in the same time in
my head ... sigh :)

> maybe better (from gcc, where this is an error, not warning)
> 
>     "missing terminating %c character", delim);

Yes, it's finally what I've used.

Thanks
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux