URL: https://linuxfr.org/forums/programmationautre/posts/bug-gcc-341-et-33 Title: Bug gcc 3.4.1 et 3.3 ? Authors: tpierron Date: 2004年12月14日T18:56:30+01:00 Tags: Score: 0 Argh, je ne sais pas si ma distrib est dans les choux ou si c'est vraiment un bug de gcc. En tous les cas, ça me parait trop gros pour être un bug, je dois forcément avoir merdé quelque part. Est-ce que quelqu'un pourrait me dire s'il a le même problème que moi en compilant ce petit programme C, sur machine intel (j'ai un P4 Xeon), histoire de voir si je suis le seul pingouin^Wmanchot à avoir ce problème : $ cat test.c #include <stdio.h> /* Euh, attention aux balises :-\ */ int main( int nb, char *argv[] ) { unsigned char a = nb, b = nb + 1; printf("a = %d - b = %d\n", a, b); a ^= b; b ^= a; a ^= b; printf("a = %d - b = %d\n", a, b); return 0; } $ gcc --version gcc (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -O test.c -o test /home/thierry/tmp/cciBJg3E.s: Assembler messages: /home/thierry/tmp/cciBJg3E.s:25: Error: bad register name `%sil' $ gcc -O2 test.c -o test /home/thierry/tmp/ccjPxvyd.s: Assembler messages: /home/thierry/tmp/ccjPxvyd.s:24: Error: bad register name `%sil' $ gcc -O3 test.c -o test $ ./test a = 1 - b = 2 a = 2 - b = 1 $ gcc test.c -o test $ ./test a b a = 3 - b = 4 a = 4 - b = 3 $ Huh ???!!! bash: !: event not found Rien vu sur google ni dans le bugzilla de gcc.