Get repository to build with GCC 11

See #594
This commit is contained in:
Justine Tunney 2022-09-13 04:14:20 -07:00
parent 446a1f7c5a
commit 06f9a5b627
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
34 changed files with 115 additions and 51 deletions

View file

@ -427,7 +427,9 @@ eval_makefile (const char *filename, unsigned short flags)
fclose (ebuf.fp);
free (ebuf.bufstart);
alloca (0);
/* [jart] breaks gcc11 (also wat) */
void *volatile wat = alloca (0);
errno = 0;
return deps;
@ -469,7 +471,8 @@ eval_buffer (char *buffer, const floc *flocp)
reading_file = curfile;
alloca (0);
/* [jart] breaks gcc11 (also wat) */
void *volatile wat = alloca (0);
}
/* Check LINE to see if it's a variable assignment or undefine.
@ -2495,7 +2498,8 @@ find_percent_cached (const char **string)
if (! new)
{
slen = strlen (*string);
new = alloca (slen + 1);
/* [jart] can't prove alloca() isn't returned; let's just leak */
new = malloc (slen + 1);
memcpy (new, *string, slen + 1);
p = new + (p - *string);
*string = new;