Bug#372913: gcc-4.1: datatype limits / signedness differs with optimization levels
Am Montag, 12. Juni 2006 18:24 schrieb Bastian Blank: > char is neither signed nor unsigned. Only unsigned have defined overflow > behaviour. > > > } while (c != '\0'); > > > > return 0; > > } Alright, but why does this work differently using different versions of gcc or different optimization levels? Regards, Erik pgpu9o16AbjaD.pgp Description: PGP signature
Bug#372913: assembler output...
I made a diff of the assembler code with -O0 and -O2: 1 --- test_O0 2006-06-12 15:30:56.0 +0200 2 +++ test_O2 2006-06-12 15:30:49.0 +0200 3 @@ -1,5 +1,6 @@ 4 .file "test.c" 5 .text 6 + .p2align 4,,15 7 .globl main 8 .type main, @function 9 main: 10 @@ -9,18 +10,8 @@ 11 pushl %ebp 12 movl%esp, %ebp 13 pushl %ecx 14 - subl$16, %esp 15 - movb$0, -5(%ebp) 16 .L2: 17 - incb-5(%ebp) 18 - cmpb$0, -5(%ebp) 19 - jne .L2 20 - movl$0, %eax 21 - addl$16, %esp 22 - popl%ecx 23 - popl%ebp 24 - leal-4(%ecx), %esp 25 - ret 26 + jmp .L2 27 .size main, .-main 28 .ident "GCC: (GNU) 4.1.2 20060604 (prerelease) (Debian 4.1.1-2)" 29 .section.note.GNU-stack,"",@progbits Seems like it "optimizes" the essential comparision around line 18... Regards, Erik -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#372913: gcc-4.1: datatype limits / signedness differs with optimization levels
Package: gcc-4.1 Version: 4.1.1-2 Severity: critical Justification: breaks unrelated software Use this little example to see what's happening: #include int main(void) { char c = '\0'; do { printf("%d\n", c); c++; } while (c != '\0'); return 0; } - using -O0 as optimization level with gcc-4.1 works as expected: the values change from 0 over 127, -128 (because of the signedness) back to 0 - using -O1 with gcc-4.1 makes the values go from 0 to 255 - using -O2 (or higher) results in an infinite loop This also occurs in gcc-snapshot and does not in gcc < 4.1. Regards, Erik -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-2-k7 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) (ignored: LC_ALL set to [EMAIL PROTECTED]) Versions of packages gcc-4.1 depends on: ii binutils 2.16.1cvs20060413-1 The GNU assembler, linker and bina ii cpp-4.1 4.1.1-2 The GNU C preprocessor ii gcc-4.1-base 4.1.1-2 The GNU Compiler Collection (base ii libc62.3.6-15GNU C Library: Shared libraries ii libgcc1 1:4.1.1-2 GCC support library Versions of packages gcc-4.1 recommends: ii libc6-dev 2.3.6-15 GNU C Library: Development Librari ii libmudflap0-dev 4.1.1-2GCC mudflap support libraries (dev ii libssp0-dev 4.1.1-2GCC stack smashing protection libr -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#346115: oh...
... I just forgot about this bug report of mine, however, the problem doesn't show up anymore on current testing versions, so please close my bug report. :) lg Erik pgpwCboI5Pvcz.pgp Description: PGP signature
Bug#346115: lineak-xosdplugin: doesn't print onscreen messages anymore
> Is it the first time you use lineak-xosdplugin, or have you use it before and it stopped to work? Well, I used it, and it worked for a while. I pushed the next-prev-buttons on my girlfriend's multimedia keyboard, and the messages appeared in amarok. It stopped working months or weeks ago, so I tried to fix it, yesterday. Starting lineakd threw a message about lineakd being unable to call the function, so I commented it in and made it compile and link. If you wish, I ask my girlfriend to reproduce the bug using the original etch package. It might be useful to mention, that I use an etch environment with KDE 3.5 packages from alioth and backported amarok. However, by commenting in the function, xosdplugin worked again. It may also be that this bug only triggers since version 2 of libxosd. I don't know when the transition to version 2 has been done. lg Erik -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#346115: lineak-xosdplugin: doesn't print onscreen messages anymore
Package: lineak-xosdpluginVersion: 1:0.8.3-6Severity: graveJustification: renders package unusableTags: patchHilineak-xosdplugin doesn't print its onscreen messages. The problem seems to be in the initialize_display function inxosd_plugin/xosdplugin.cpp, which is commented out.When I use the following function instead, it compiles and works well.extern "C" void initialize_display(displayCtrl *imyDisplay) { if (verbose) cout << "Initializing display!" << endl; default_display = (xosdCtrl *) imyDisplay;}RegardsErik-- System Information:Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing'), (500, 'stable')Architecture: i386 (i686)Shell: /bin! /sh linked to /bin/bashKernel: Linux 2.6.14-2-k7Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)Versions of packages lineak-xosdplugin depends on:ii libc6 2.3.5-8 GNU C Library: Shared libraries anii libgcc1 1:4.0.2-5 GCC support libraryii liblineak0 1:0.8.3-8 LinEAK development filesii libstdc++6 4.0.2-5&nb! sp; The GNU Standard C++ Library v3ii libx 11-6 6.8.2.dfsg.1-11 X Window System protocol client liii libxext6 6.8.2.dfsg.1-11 X Window System miscellaneous exteii libxinerama1 6.8.2.dfsg.1-11 X Window System multi-head displayii libxosd2 2.2.14-1.2 X On-Screen Display library - runtii lineakd 1:0.8.3-8 Linux support for Easy Access andlineak-xosdplugin recommends no packages.-- no debconf information