From: Per Bothner <bothner@cygnus.com>
To: Ross Alexander <r.alexander@auckland.ac.nz>
Cc: egcs@cygnus.com
Subject: Re: Non-constant initializers
Date: Tue, 21 Apr 1998 23:21:00 -0000 [thread overview]
Message-ID: <199804220542.WAA06146@cygnus.com> (raw)
In-Reply-To: <199804220014.MAA02176@ccu1.auckland.ac.nz>
> It seems that code like
> FILE *f = stdin;
> fail because of non-constant initializer. This did not happen before.
Er, whether this works depends on whether the language or C or C++
(whcih you did not specify) and what the definition of stdin is in
your C libraries (which you also did not specify).
It is supposed to work in C++, and it is undefined whether it works
in C: It depends on the definition of stdin. Under traditional
Unix it works, because stdin is &_iob[0]; under many other systems
it doesn't. This is not a bug in egcs or libc, but a bug in your code.
--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner
next prev parent reply other threads:[~1998-04-21 23:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-21 17:38 Ross Alexander
1998-04-21 23:21 ` Per Bothner [this message]
1998-04-22 3:17 ` Andreas Schwab
[not found] <199804220636.XAA08145@cygnus.com>
1998-04-22 3:17 ` Ross Alexander
1998-04-22 8:38 Kaz Kylheku
1998-04-22 15:21 Mike Stump
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=199804220542.WAA06146@cygnus.com \
--to=bothner@cygnus.com \
--cc=egcs@cygnus.com \
--cc=r.alexander@auckland.ac.nz \
/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).