[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#37295: marked as done (-fno-inline causes strcpy(foo, "") to break)

Your message dated Tue, 21 Sep 1999 21:41:15 -0700
with message-id <v0420551cb40e0e44b875@[]>
and subject line Bug#37295: -fno-inline causes strcpy(foo, "") to break
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 7 May 1999 16:02:03 +0000
Received: (qmail 30345 invoked from network); 7 May 1999 16:02:03 -0000
Received: from cupido.cs.hut.fi (
  by master.debian.org with SMTP; 7 May 1999 16:02:03 -0000
Received: from liw by cupido.cs.hut.fi with local (Exim 2.11 #1 (Debian))
	for submit@bugs.debian.org
	id 10fn3a-0008AT-00; Fri, 7 May 1999 19:00:58 +0300
Date: Fri, 07 May 1999 16:00:58 GMT
Message-ID: <slime-b19b40c20f3f69450b6f86eb6b8e9541@cupido.cs.hut.fi>
From: Lars Wirzenius <liw@iki.fi>
To: submit@bugs.debian.org
Subject: -fno-inline causes strcpy(foo, "") to break
Sender: Lars Wirzenius <liw@cupido.cs.hut.fi>

Package: libc6-dev
Version: 2.1.1-2

Consider the following program:

#include <string.h>
#include <stdio.h>
int main(void) {
	char s[10];
	strcpy(s, "");
	printf("s=%s.\n", s);
	return 0;

As far as I can determine, it is strictly conforming standard C. If I compile
it without -fno-inline, the following happens:

$ gcc -O foo.c
$ ./a.out

Ergo, it works as it should. If I use -fno-inline, however, it fails to work:

$ gcc -O -fno-inline foo.c
/tmp/cc49Syvn.o: In function `main':
/tmp/cc49Syvn.o(.text+0x91): undefined reference to `__strcpy_small'
collect2: ld returned 1 exit status

As far as I understand, I should be able to use -fno-inline. The problem,
I think, is due to how /usr/include/string.h and/or /usr/include/bits/string2.h
decide on whether to use a macro of strcpy that expands to a call to
__strcpy_small in some circumstances.
Received: (at 37295-done) by bugs.debian.org; 23 Sep 1999 02:47:18 +0000
Received: (qmail 30811 invoked from network); 23 Sep 1999 02:47:18 -0000
Received: from cerberus.espy.org (mail@
  by master.debian.org with SMTP; 23 Sep 1999 02:47:18 -0000
Received: from hercules.espy.org [] 
	by cerberus.espy.org with esmtp (Exim 3.03 #1 (Debian GNU/Linux))
	id 11Tynu-00081S-01; Wed, 22 Sep 1999 19:40:14 -0700
Mime-Version: 1.0
X-Sender: jk@mail.espy.org
Message-Id: <v0420551cb40e0e44b875@[]>
Date: Tue, 21 Sep 1999 21:41:15 -0700
To: 37295-done@bugs.debian.org
From: Joel Klecker <jk@espy.org>
Subject: Re: Bug#37295: -fno-inline causes strcpy(foo, "") to break
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

Fixed upstream.
Joel Klecker (aka Espy)       <URL:mailto:espy@debian.org>
Debian Package Maintainer for the GNU C Library.

Reply to: