[Bug target/107568] Bootstrap failure on macOS 12.6 (monterey)
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 8 15:59:21 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|bootstrap |target
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The first one is definitely ok:
/* diagnostic.cc does not support "%03o". When it does, this
code can use %03o directly in the diagnostic again. */
char buf[32];
32 characters will always fit 8bit octal result.
The second one will always fit too:
static const char * const monthnames[] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
....
pfile->date = _cpp_unaligned_alloc (pfile,
sizeof ("\"Oct 11 1347\""));
sprintf ((char *) pfile->date, "\"%s %2d %4d\"",
monthnames[tb->tm_mon], tb->tm_mday,
tb->tm_year + 1900);
Likewise for the next one:
pfile->time = _cpp_unaligned_alloc (pfile,
sizeof ("\"12:34:56\""));
sprintf ((char *) pfile->time, "\"%02d:%02d:%02d\"",
tb->tm_hour, tb->tm_min, tb->tm_sec);
This is definitely a bug in Apple's headers. I guess we need to fixincludes
them to undeprecated them for GCC.
More information about the Gcc-bugs
mailing list