unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Requiring C11 breaks build with GCC 4.6.2 on Windows XP
@ 2017-06-13  7:44 martin rudalics
  2017-06-13  7:48 ` Philipp Stephani
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2017-06-13  7:44 UTC (permalink / raw)
  To: emacs-devel

This change

     Explicitly require C11 or C++11 in emacs-module.h

apparently breaks building here on Windows XP with GCC 4.6.2 as

   CC       dispnew.o
In file included from ../../src/lisp.h:3899:0,
                  from ../../src/dispnew.c:27:
../../src/emacs-module.h:25:3: error: #error "This file requires at least C11 or C++11"
make[1]: *** [dispnew.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory `/c/emacs-git/trunk/opt/admin/charsets'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/c/emacs-git/trunk/opt/admin/charsets'
make[1]: Leaving directory `/c/emacs-git/trunk/opt/src'
make: *** [src] Error 2

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-13  7:44 Requiring C11 breaks build with GCC 4.6.2 on Windows XP martin rudalics
@ 2017-06-13  7:48 ` Philipp Stephani
  2017-06-13  7:55   ` Philipp Stephani
  0 siblings, 1 reply; 8+ messages in thread
From: Philipp Stephani @ 2017-06-13  7:48 UTC (permalink / raw)
  To: martin rudalics, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

martin rudalics <rudalics@gmx.at> schrieb am Di., 13. Juni 2017 um
09:44 Uhr:

> This change
>
>      Explicitly require C11 or C++11 in emacs-module.h
>
> apparently breaks building here on Windows XP with GCC 4.6.2 as
>

Hmm. I thought we would already require C11 for building Emacs, but
apparently we don't.
Then my reasoning for requiring C11 here was incorrect - stdbool.h is
already in C99. I'll make a better patch.

[-- Attachment #2: Type: text/html, Size: 728 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-13  7:48 ` Philipp Stephani
@ 2017-06-13  7:55   ` Philipp Stephani
  2017-06-13  8:14     ` martin rudalics
  2017-06-13 20:37     ` Paul Eggert
  0 siblings, 2 replies; 8+ messages in thread
From: Philipp Stephani @ 2017-06-13  7:55 UTC (permalink / raw)
  To: martin rudalics, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

Philipp Stephani <p.stephani2@gmail.com> schrieb am Di., 13. Juni 2017 um
09:48 Uhr:

> martin rudalics <rudalics@gmx.at> schrieb am Di., 13. Juni 2017 um
> 09:44 Uhr:
>
>> This change
>>
>>      Explicitly require C11 or C++11 in emacs-module.h
>>
>> apparently breaks building here on Windows XP with GCC 4.6.2 as
>>
>
> Hmm. I thought we would already require C11 for building Emacs, but
> apparently we don't.
> Then my reasoning for requiring C11 here was incorrect - stdbool.h is
> already in C99. I'll make a better patch.
>

Should be fixed with 9af2ab68caf7a0bf3bda521729ac0376489cce19.

[-- Attachment #2: Type: text/html, Size: 1224 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-13  7:55   ` Philipp Stephani
@ 2017-06-13  8:14     ` martin rudalics
  2017-06-13 15:03       ` Kaushal Modi
  2017-06-13 20:37     ` Paul Eggert
  1 sibling, 1 reply; 8+ messages in thread
From: martin rudalics @ 2017-06-13  8:14 UTC (permalink / raw)
  To: Philipp Stephani, emacs-devel

> Should be fixed with 9af2ab68caf7a0bf3bda521729ac0376489cce19.

Confirmed.  Thanks for the prompt fix,

martin





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-13  8:14     ` martin rudalics
@ 2017-06-13 15:03       ` Kaushal Modi
  0 siblings, 0 replies; 8+ messages in thread
From: Kaushal Modi @ 2017-06-13 15:03 UTC (permalink / raw)
  To: martin rudalics, Philipp Stephani, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On Tue, Jun 13, 2017 at 4:14 AM martin rudalics <rudalics@gmx.at> wrote:

> > Should be fixed with 9af2ab68caf7a0bf3bda521729ac0376489cce19.
>
> Confirmed.  Thanks for the prompt fix,
>

Thanks for reporting this and thank you Philipp for fixing this quick.

I thought I was the only one seeing the error (make bootstrap starting
failing using the default gcc version 4.4.7 on RHEL 6.6). But things are
back in order after the fix in 9af2ab6.
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 839 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-13  7:55   ` Philipp Stephani
  2017-06-13  8:14     ` martin rudalics
@ 2017-06-13 20:37     ` Paul Eggert
  2017-06-15 12:45       ` Philipp Stephani
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Eggert @ 2017-06-13 20:37 UTC (permalink / raw)
  To: Philipp Stephani, martin rudalics, emacs-devel

Why is this version test needed at all? What problem does it fix? If it 
does not fix a significant problem, I would rather remove it. I've run 
into too many compilers that support C well enough but do not define 
__STDC_VERSION__ to an "approved" value.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-13 20:37     ` Paul Eggert
@ 2017-06-15 12:45       ` Philipp Stephani
  2017-06-15 17:35         ` Paul Eggert
  0 siblings, 1 reply; 8+ messages in thread
From: Philipp Stephani @ 2017-06-15 12:45 UTC (permalink / raw)
  To: Paul Eggert, martin rudalics, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

Paul Eggert <eggert@cs.ucla.edu> schrieb am Di., 13. Juni 2017 um 22:37 Uhr:

> Why is this version test needed at all? What problem does it fix? If it
> does not fix a significant problem, I would rather remove it. I've run
> into too many compilers that support C well enough but do not define
> __STDC_VERSION__ to an "approved" value.
>

I'm not opposed to removing it if you think it causes more problems than it
solves. My intention was to give users of pre-C99 compilers a better error
message instead of something like "header stdbool.h not found", but maybe
that's not necessary.

[-- Attachment #2: Type: text/html, Size: 902 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Requiring C11 breaks build with GCC 4.6.2 on Windows XP
  2017-06-15 12:45       ` Philipp Stephani
@ 2017-06-15 17:35         ` Paul Eggert
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Eggert @ 2017-06-15 17:35 UTC (permalink / raw)
  To: Philipp Stephani, martin rudalics, emacs-devel

On 06/15/2017 05:45 AM, Philipp Stephani wrote:
> I'm not opposed to removing it if you think it causes more problems 
> than it solves.

Yes, in practice __STDC_VERSION__ is not reliable in general. Compilers 
define it even when they are not fully conforming, and they don't define 
it even when they support all the standard features one happens to need. 
See, for example, the thread containing this message:

http://lists.gnu.org/archive/html/autoconf-patches/2012-10/msg00006.html

__STDC_VERSION__ can be used in some cases, but I don't think this is 
one of the cases. So I removed the check.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-15 17:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13  7:44 Requiring C11 breaks build with GCC 4.6.2 on Windows XP martin rudalics
2017-06-13  7:48 ` Philipp Stephani
2017-06-13  7:55   ` Philipp Stephani
2017-06-13  8:14     ` martin rudalics
2017-06-13 15:03       ` Kaushal Modi
2017-06-13 20:37     ` Paul Eggert
2017-06-15 12:45       ` Philipp Stephani
2017-06-15 17:35         ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).