* Latest GCC can't compile keymap.c correctly.
@ 2006-09-07 2:31 Kenichi Handa
2006-09-07 16:50 ` Stefan Monnier
2006-09-07 21:14 ` Richard Stallman
0 siblings, 2 replies; 6+ messages in thread
From: Kenichi Handa @ 2006-09-07 2:31 UTC (permalink / raw)
Cc: j.s
I've got this bug report.
When the latest Emacs is compiled with the following
environment,
% gcc --version
gcc (GCC) 4.2.0 20060903 (experimental)
% uname -a
SunOS mars 5.10 Generic_118833-20 sun4u sparc
% emacs --version
GNU Emacs 22.0.50.1
Meta key stops working. For instance, we get this error:
M-f is undefined
When we compile only keymap.c with gcc-4.0.3 and link it,
the problem disappears.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Latest GCC can't compile keymap.c correctly.
2006-09-07 2:31 Latest GCC can't compile keymap.c correctly Kenichi Handa
@ 2006-09-07 16:50 ` Stefan Monnier
2006-09-08 0:19 ` 塩野@システム構築部
2006-09-07 21:14 ` Richard Stallman
1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2006-09-07 16:50 UTC (permalink / raw)
Cc: j.s, emacs-devel
> I've got this bug report.
> When the latest Emacs is compiled with the following
> environment,
> % gcc --version
> gcc (GCC) 4.2.0 20060903 (experimental)
> % uname -a
> SunOS mars 5.10 Generic_118833-20 sun4u sparc
> % emacs --version
> GNU Emacs 22.0.50.1
> Meta key stops working. For instance, we get this error:
> M-f is undefined
> When we compile only keymap.c with gcc-4.0.3 and link it,
> the problem disappears.
If it's compiled with gcc-4.2 but with -Wall, what warnings do you get?
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Latest GCC can't compile keymap.c correctly.
2006-09-07 2:31 Latest GCC can't compile keymap.c correctly Kenichi Handa
2006-09-07 16:50 ` Stefan Monnier
@ 2006-09-07 21:14 ` Richard Stallman
1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2006-09-07 21:14 UTC (permalink / raw)
Cc: j.s, emacs-devel
When we compile only keymap.c with gcc-4.0.3 and link it,
the problem disappears.
Either keymap.c has a bug or the latest GCC has a bug.
We need to find out which function the problem is in.
I suggest you split keymap.c into two files, and try compiling one
with each GCC version. By moving functions between the two files you
can determine where the problem is. (If you are using a high
optimization level that does interprocedural optimization, you may
need more subtle techniques to determine which function.)
Once you know which function it is, make a .s file with each GCC
version, and compare the two with each other and with the source code.
This way you will find where the GCC 4.2 assenbly code is wrong. Then
you can see whether there is something in the source code that has
unspecified or undefined behavior. If so, we should fix that. If
not, then it is a GCC bug, and you will have all the info needed to
report it properly.
I know this is a substantial amount of work, but it is the only way
to solve the problem. And if this is a GCC bug, it is very important
to fix it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Latest GCC can't compile keymap.c correctly.
2006-09-07 16:50 ` Stefan Monnier
@ 2006-09-08 0:19 ` 塩野@システム構築部
2006-09-08 5:05 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: 塩野@システム構築部 @ 2006-09-08 0:19 UTC (permalink / raw)
Cc: emacs-devel, Kenichi Handa
Hi, Stefan
>>>>> In <jwv64fz1v1z.fsf-monnier+emacs@gnu.org>
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > % gcc --version
> > gcc (GCC) 4.2.0 20060903 (experimental)
> > % uname -a
> > SunOS mars 5.10 Generic_118833-20 sun4u sparc
> > % emacs --version
> > GNU Emacs 22.0.50.1
> If it's compiled with gcc-4.2 but with -Wall, what warnings do you get?
> Stefan
gcc -c -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/opt/local/src/emacs/src -I/opt/X11R6.6/include -I/usr/dt/include -g -O2 -Wno-pointer-sign -Wall /opt/local/src/emacs/src/keymap.c
/opt/local/src/emacs/src/keymap.c: In function 'Fkey_description':
/opt/local/src/emacs/src/keymap.c:2016: Warn: implicit declaration of function 'alloca'
/opt/local/src/emacs/src/keymap.c:2016: Warn: incompatible implicit declaration of built-in function 'alloca'
/opt/local/src/emacs/src/keymap.c: In function 'Fsingle_key_description':
/opt/local/src/emacs/src/keymap.c:2292: Warn: incompatible implicit declaration of built-in function 'alloca'
/opt/local/src/emacs/src/keymap.c: In function 'Fwhere_is_internal':
/opt/local/src/emacs/src/keymap.c:2712: Warn: incompatible implicit declaration of built-in function 'alloca'
/opt/local/src/emacs/src/keymap.c: In function 'Fdescribe_buffer_bindings':
/opt/local/src/emacs/src/keymap.c:2941: Warn: incompatible implicit declaration of built-in function 'alloca'
/opt/local/src/emacs/src/keymap.c: In function 'describe_map':
/opt/local/src/emacs/src/keymap.c:3265: Warn: incompatible implicit declaration of built-in function 'alloca'
/opt/local/src/emacs/src/keymap.c: In function 'describe_vector':
/opt/local/src/emacs/src/keymap.c:3502: Warn: incompatible implicit declaration of built-in function 'alloca'
I replaced messages from '警告' to 'Warn'. caz, it's Japanese.
--
Jun
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Latest GCC can't compile keymap.c correctly.
2006-09-08 0:19 ` 塩野@システム構築部
@ 2006-09-08 5:05 ` Stefan Monnier
2006-09-11 8:49 ` 塩野@システム構築部
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2006-09-08 5:05 UTC (permalink / raw)
Cc: emacs-devel, Kenichi Handa
>> If it's compiled with gcc-4.2 but with -Wall, what warnings do you get?
> gcc -c -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/opt/local/src/emacs/src -I/opt/X11R6.6/include -I/usr/dt/include -g -O2 -Wno-pointer-sign -Wall /opt/local/src/emacs/src/keymap.c
> /opt/local/src/emacs/src/keymap.c: In function 'Fkey_description':
> /opt/local/src/emacs/src/keymap.c:2016: Warn: implicit declaration of function 'alloca'
> /opt/local/src/emacs/src/keymap.c:2016: Warn: incompatible implicit declaration of built-in function 'alloca'
[...]
Thanks. Does the patch below fix the problem?
Stefan
--- keymap.c 20 aoû 2006 01:24:17 -0400 1.330
+++ keymap.c 08 sep 2006 01:05:09 -0400
@@ -23,6 +23,7 @@
#include <config.h>
#include <stdio.h>
+#include <alloca.h>
#include "lisp.h"
#include "commands.h"
#include "buffer.h"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Latest GCC can't compile keymap.c correctly.
2006-09-08 5:05 ` Stefan Monnier
@ 2006-09-11 8:49 ` 塩野@システム構築部
0 siblings, 0 replies; 6+ messages in thread
From: 塩野@システム構築部 @ 2006-09-11 8:49 UTC (permalink / raw)
Cc: emacs-devel, Kenichi Handa
Hi,
>>>>> In <jwvejunaqy8.fsf-monnier+emacs@gnu.org>
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Thanks. Does the patch below fix the problem?
gcc -c -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I. -I/opt/local/src/emacs/src -I/op
t/X11R6.6/include -I/usr/dt/include -g -O2 -Wno-pointer-sign -Wall /opt/local/sr
c/emacs/src/keymap.c
Warning Messages was gone, but I can not use META key.
I notice that I use emacs -nw mode from Windows machine vie
TeraTerm then I can use META key on that emacs.
--
∧_∧
ミ^.^ミ E-Mail: j.s@jp.fujitsu.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-09-11 8:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07 2:31 Latest GCC can't compile keymap.c correctly Kenichi Handa
2006-09-07 16:50 ` Stefan Monnier
2006-09-08 0:19 ` 塩野@システム構築部
2006-09-08 5:05 ` Stefan Monnier
2006-09-11 8:49 ` 塩野@システム構築部
2006-09-07 21:14 ` Richard Stallman
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).