This is the mail archive of the
mailing list for the glibc project.
Re: Fix strftime build with GCC 8
> Dnia 29 czerwiec 2017 o 00:56 Paul Eggert <firstname.lastname@example.org> napisał(a):
> Rafal Luzynski wrote:
> > wouldn't a simple compound expression do the work?
> It's better to use do-while in case the macro is used as a then-part of an
> if-statement, where a simple compound expression would cause a syntax error.
Wouldn't it expand to:
if (modifier == L_('O'))
digits = 1 > width ? 1 : width;
number_value = tp->tm_year + TM_YEAR_BASE;
I can't see a syntax error unless GCC 8 is different.
> FWIW, the Gnulib copy of strftime has been using do-while for some time.
As I said before, this is not a huge difference and probably even the
binary code is not different. Not worth fixing if you like the code
as it is.