aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2023-12-05 11:06:04 +0100
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2023-12-05 11:06:04 +0100
commit12769548679af8162af5f4bf15265b2228386c75 (patch)
tree634d6c6a9993f084e14638dedeca71b825ffaf99 /libgcc
parent691858d279335eeeeed3afafdf872b1c5f8f4201 (diff)
downloadgcc-12769548679af8162af5f4bf15265b2228386c75.zip
gcc-12769548679af8162af5f4bf15265b2228386c75.tar.gz
gcc-12769548679af8162af5f4bf15265b2228386c75.tar.bz2
gm2: Fix mc/mc.flex compilation on Solaris
The recent warning changes broke gm2 bootstrap on Solaris: /vol/gcc/src/hg/master/local/gcc/m2/mc/mc.flex: In function 'handleFile': /vol/gcc/src/hg/master/local/gcc/m2/mc/mc.flex:297:21: error: implicit declaration of function 'alloca' [-Wimplicit-function-declaration] 297 | char *s = (char *)alloca (strlen (filename) + 2 + 1); | ^~~~~~ alloca needs <alloca.h> on Solaris, which isn't universally available. Since mc.flex doesn't include any config header, I chose to switch to __builtin_alloca instead. /vol/gcc/src/hg/master/local/gcc/m2/mc/mc.flex:332:19: error: implicit declaration of function 'index' [-Wimplicit-function-declaration] 332 | char *p = index(sdate, '\n'); | ^~~~~ index is declared in <strings.h> on Solaris, again not a standard header. I simply switched to using strchr to avoid that issue. Bootstrapped without regressions on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin23.1.0. 2023-12-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc/m2: * mc/mc.flex [__GNUC__]: Define alloca as __builtin_alloca. (handleDate): Use strchr instead of index.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions