This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: AIX I/O failures
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: AIX I/O failures
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 25 Jan 2001 21:20:58 +0100
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, Mark Mitchell <mark at codesourcery dot com>, Benjamin Kosnik <bkoz at nabi dot net>, Phil Edwards <pedwards at jaj dot com>, libstdc++ at sources dot redhat dot com
- Organization: CodeSourcery, LLC
- References: <200101252008.PAA22148@mal-ach.watson.ibm.com>
David Edelsohn <dje@watson.ibm.com> writes:
| >>>>> Gabriel Dos Reis writes:
|
| Gabriel> Mark Mitchell <mark@codesourcery.com> writes:
|
| Gabriel> | char cin[sizeof(istream)]
| Gabriel> | __attribute__ ((__align (__alignof__ (istream))));
|
| Gabriel> Wouldn't then cin get type 'char[]'? Or am I missing something?
|
| Yes. I believe that one needs to keep the cin type used in the
| initializer completely separate from the rest of the code which defines
| the correct istream type for cin.
This is really ugly because, on one hand cin is seen with the right
type and on the other hand as array[] at the code level -- I wouldn't
to debug such a mess.
Can a conforming program detect the followiing declaration for cin:
extern istream& cin; // can a conforming program detect?
so that we can do
char __cin_storage[sizeof(istream)]
__attribute__ ((__align (__alignof__ (istream))));
istream& cin = *(istream*)(&__cin_storage[0]);
Or is that still sufering from the init issue?
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com