[Top][All Lists]

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

Re: [patch #9620] spurious compiler warning: "potential null pointer der

From: Frank Heckenbach
Subject: Re: [patch #9620] spurious compiler warning: "potential null pointer dereference"
Date: Mon, 21 May 2018 22:51:48 +0200

Akim Demaille wrote:

> > Le 11 mai 2018 à 05:19, Frank Heckenbach <address@hidden> a écrit :
> > 
> > Akim Demaille wrote:
> > 
> >>> I also find the code a bit strange at all; why have a number of format 
> >>> strings
> >>> that differ only in the number of "or %s" parts, and which must all be
> >>> translated individually? Rather than adding repeated parts in a loop, or 
> >>> using
> >>> a more flexible wording such as "expecing one of the following: « ?
> >> 
> >> Because of internationalization: you don't know how it would be
> >> translated, how punctuation would be, etc.
> > 
> > In my suggestion only the text "expecing one of the following:"
> > would need to be translated.
> Yes, I see that, but it seems less natural, and will require
> special treatment for the case 1 anyway.

Sure, possibly also for the case 2 (for easier reading). But that
would still be fewer than the 5 special cases there are now.

> So far everybody agreed that if there are too many options,
> listing them is useless, so that « limitation » is not a real
> one, it is a feature.  Would you agree with that?

I'd say for now I'm neutral on that. I remember wondering once why
Bison sometime does and sometimes doesn't output the expected list.
I had assumed a deeper reason, such as it being too hard to figure
out the list in some cases, until I came about this switch now.
Then again, in many cases where one gets that error, the actual
problem is a bit earlier, so the user doesn't really care what would
be expected here, since it shouldn't even have gotten here.

All in all, I'm fine with the change you installed. As I said, my
main annoyance was the compiler warning which is now gone.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]