public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: tm@netcom.com (Toshiyasu Morita)
Cc: gcc2@cygnus.com, egcs@cygnus.com
Subject: Re: another binutils-2.8.1 bug?
Date: Sat, 10 Jan 1998 16:43:00 -0000	[thread overview]
Message-ID: <m0xr8it-0004ecC@ocean.lucon.org> (raw)
In-Reply-To: <199801102021.MAA28966@netcom9.netcom.com>

> 
> 
> 
> Yup, it's local.
> 
> Evidently, if you change a static function into a non-static function, 
> but the static prototype is left floating around, GCC converts the 
> function to a static automatically, which seems rather dangerous.
> 

I don't know what ANSI C says on it.

# gcc -S x.c -O 
x.c:4: conflicting types for `foo'
x.c:1: previous declaration of `foo'
----
	.file	"x.c"
	.version	"01.01"
/ GNU C version 2.8.0 (i586-unknown-linux-gnulibc1) compiled by GNU C version 2.8.0.
/ options passed:  -O
/ options enabled:  -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse
/ -finline -fkeep-static-consts -fpcc-struct-return -fcommon -fverbose-asm
/ -fgnu-linker -m80387 -mhard-float -mno-soft-float -mieee-fp
/ -mfp-ret-in-387 -mschedule-prologue -mcpu=pentium -march=pentium

gcc2_compiled.:
.text
	.align 4
	.type	 foo,@function
foo:
	pushl %ebp
	movl %esp,%ebp
	movl %ebp,%esp
	popl %ebp
	ret
.Lfe1:
	.size	 foo,.Lfe1-foo
	.ident	"GCC: (GNU) 2.8.0"
---
static void foo ();

foo ()
{
}

       reply	other threads:[~1998-01-10 16:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199801102021.MAA28966@netcom9.netcom.com>
1998-01-10 16:43 ` H.J. Lu [this message]
1998-01-11  0:31   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0xr8it-0004ecC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=egcs@cygnus.com \
    --cc=gcc2@cygnus.com \
    --cc=tm@netcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).