|
From: | Paul Eggert |
Subject: | Re: GCC 4.9.1 suggests -std=c99 |
Date: | Tue, 09 Sep 2014 07:58:54 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Dmitry Antipov wrote:
With GCC 4.9.1 and '--enable-checking --enable-check-lisp-object-type --enable-gcc-warnings': ../../trunk/src/sysdep.c: In function 'str_collate': ../../trunk/src/sysdep.c:3751:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
I don't observe this problem when I build with GCC 4.9.1. src/Makefile says "CC = gcc -std=gnu99", so it works. Perhaps you overrode CC? Or maybe you have an old version of autoconf?
While we're on the topic, --enable-gcc-warnings generates false alarms when combined with arbitrary other options like --enable-check-lisp-object-type, CFLAGS='-g3 -O0', etc. I do not take the trouble to pacify GCC for all combinations of build options, just for the default ones.
[Prev in Thread] | Current Thread | [Next in Thread] |