Your message dated Tue, 23 Jun 2015 07:24:48 +0000 with message-id <E1Z7IZc-0001tY-Ii@franck.debian.org> and subject line Bug#789156: Removed package(s) from unstable has caused the Debian Bug report #474086, regarding gcc-4.2: Constant optimization for strlen() prints bogus warnings to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 474086: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474086 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: gcc-4.2: Constant optimization for strlen() prints bogus warnings
- From: "Ph. Marek" <philipp.marek@bmlv.gv.at>
- Date: Thu, 3 Apr 2008 10:02:16 +0200
- Message-id: <200804031002.17037.philipp.marek@bmlv.gv.at>
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Reportbug-Version: 3.39 X-Debbugs-Cc: philipp.marek@bmlv.gv.at Package: gcc-4.2 Version: 4.2.3-3 Severity: minor I try to compile the attached C file via the command $ gcc -Wall -Os -S % and get several warnings: test.c:6: warning: initializer element is not constant test.c:6: warning: (near initialization for ‘i’) test.c:7: warning: initializer element is not constant test.c:7: warning: (near initialization for ‘si’) test.c:8: warning: initializer element is not constant test.c:8: warning: (near initialization for ‘ci’) test.c:11: warning: initializer element is not constant test.c:11: warning: (near initialization for ‘s’) Now all of the strlen() calls get (correctly!) optimized out into constants; but why do I get the warnings? I know that constants used within functions could be done via atstart() mechanism or on first function call; but as these lengths are already constants in the assembler output, any strlen() overloading wouldn't work anyway. So, as conclusion: If strlen() is taken as known for constant strings (and optimized as such), no warning about its return value being non-constant should be given. Or am I missing some part of the picture? -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (600, 'testing'), (50, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.22-1-686 (SMP w/1 CPU core) Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_AT.utf8) Shell: /bin/sh linked to /bin/bash Versions of packages gcc-4.2 depends on: ii binutils 2.18.1~cvs20080103-3 The GNU assembler, linker and bina ii cpp-4.2 4.2.3-3 The GNU C preprocessor ii gcc-4.2-base 4.2.3-3 The GNU Compiler Collection (base ii libc6 2.7-10 GNU C Library: Shared libraries ii libgcc1 1:4.3.0-3 GCC support library Versions of packages gcc-4.2 recommends: ii libc6-dev 2.7-10 GNU C Library: Development Librari -- no debconf informationAttachment: test.s
Description: Binary data#include <string.h> #include <stdio.h> #define STG "asdf" int i=strlen(STG); static int si=strlen(STG); const int ci=strlen(STG); struct { int i; } s={ .i=strlen(STG) }; int main(void) { int l=strlen(STG); const int cl=strlen(STG); printf("local %d, const local %d; global %d, static %d, const %d, struc %d\n", l, cl, i, si,ci, s.i); return 0; }
--- End Message ---
--- Begin Message ---
- To: 85535-done@bugs.debian.org,204687-done@bugs.debian.org,452431-done@bugs.debian.org,460264-done@bugs.debian.org,474086-done@bugs.debian.org,669330-done@bugs.debian.org,678033-done@bugs.debian.org,679075-done@bugs.debian.org,680776-done@bugs.debian.org,681076-done@bugs.debian.org,683782-done@bugs.debian.org,686178-done@bugs.debian.org,686645-done@bugs.debian.org,697133-done@bugs.debian.org,701082-done@bugs.debian.org,707644-done@bugs.debian.org,708142-done@bugs.debian.org,710830-done@bugs.debian.org,714839-done@bugs.debian.org,714840-done@bugs.debian.org,714841-done@bugs.debian.org,716700-done@bugs.debian.org,719730-done@bugs.debian.org,719732-done@bugs.debian.org,721720-done@bugs.debian.org,722139-done@bugs.debian.org,730654-done@bugs.debian.org,731886-done@bugs.debian.org,733830-done@bugs.debian.org,737459-done@bugs.debian.org,739502-done@bugs.debian.org,741960-done@bugs.debian.org,742574-done@bugs.debian.org,742700-done@bugs.debian.org,762028-done@bugs.debian.org,762076-done@bug s.debian.org,763160-done@bugs.debian.org,765379-done@bugs.debian.org,
- Cc: gcc-4.7@packages.debian.org, gcc-4.7@packages.qa.debian.org
- Subject: Bug#789156: Removed package(s) from unstable
- From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
- Date: Tue, 23 Jun 2015 07:24:48 +0000
- Message-id: <E1Z7IZc-0001tY-Ii@franck.debian.org>
Version: 4.7.4-3+rm Dear submitter, as the package gcc-4.7 has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/789156 The version of this package that was in Debian prior to this removal can still be found using http://snapshot.debian.org/. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Luca Falavigna (the ftpmaster behind the curtain)
--- End Message ---