> Le 17 nov. 2019 à 18:37, Akim Demaille <[email protected]> a écrit :
> 
> String literals as tokens serve two distinct purposes: freeing from
> having to implement the keyword matching in the scanner, and improving
> error messages.  Most of the time both can be achieved at the same
> time, but on occasions, it does not work so well.
> 
> We promote their use for error messages, and will still support the
> former case, but it is _not_ the recommended approach.
> 
> Besides, string literals, because they don't need to be declared, are
> somewhat dangerous.  The new option -Wdangling-alias should help
> catching them.  I'm unsure about the proper name for this warning.  I
> once used "useless-alias", but it's too strong: some people do use the
> string aliases in their scanners.  Could also have been
> -Wunbound-alias.  I'd be happy to receive suggestions!

Pushed.

Reply via email to