public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* ctime declaration in libgcc2.c
@ 2001-12-02  4:16 Richard Kenner
  2001-12-03 14:51 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Kenner @ 2001-12-02  4:16 UTC (permalink / raw)
  To: gcc

It was pointed out to me that it's incorrect to declare such a function
in that way since it cause incompabilities (and does on VMS).

I see that I was the one who added that declaration, nearly a year ago,
presumably to silence a warning.

Mot systems seem to have it in time.h, but can we safely #include that
from libgcc2.c?

Any other suggestions?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ctime declaration in libgcc2.c
  2001-12-02  4:16 ctime declaration in libgcc2.c Richard Kenner
@ 2001-12-03 14:51 ` Richard Henderson
  2001-12-03 15:07   ` Zack Weinberg
  2001-12-04  7:41   ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Henderson @ 2001-12-03 14:51 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc

On Sun, Dec 02, 2001 at 07:11:14AM -0500, Richard Kenner wrote:
> Mot systems seem to have it in time.h, but can we safely #include that
> from libgcc2.c?

No.
 
> Any other suggestions?

Leave the warning.


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ctime declaration in libgcc2.c
  2001-12-03 14:51 ` Richard Henderson
@ 2001-12-03 15:07   ` Zack Weinberg
  2001-12-04  7:41   ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Zack Weinberg @ 2001-12-03 15:07 UTC (permalink / raw)
  To: Richard Henderson, Richard Kenner, gcc

On Mon, Dec 03, 2001 at 02:50:36PM -0800, Richard Henderson wrote:
> On Sun, Dec 02, 2001 at 07:11:14AM -0500, Richard Kenner wrote:
> > Mot systems seem to have it in time.h, but can we safely #include that
> > from libgcc2.c?
> 
> No.

I had a patch ages ago that made fixproto generate time.h so we could
use it in libgcc2.c.  Should dust that off and finish it.

zw

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ctime declaration in libgcc2.c
  2001-12-03 14:51 ` Richard Henderson
  2001-12-03 15:07   ` Zack Weinberg
@ 2001-12-04  7:41   ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2001-12-04  7:41 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Richard Kenner, gcc

Richard Henderson <rth@redhat.com> writes:

|> On Sun, Dec 02, 2001 at 07:11:14AM -0500, Richard Kenner wrote:
|> > Mot systems seem to have it in time.h, but can we safely #include that
|> > from libgcc2.c?
|> 
|> No.
|>  
|> > Any other suggestions?
|> 
|> Leave the warning.

Do you propose to remove the declaration?  That would break ia64.  ctime
is returning a pointer, and not declarating it properly will cause a crash
due to sizeof(int) < sizeof(char *), thus losing significant bits.

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-04 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-02  4:16 ctime declaration in libgcc2.c Richard Kenner
2001-12-03 14:51 ` Richard Henderson
2001-12-03 15:07   ` Zack Weinberg
2001-12-04  7:41   ` Andreas Schwab

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).