X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: -fpack-struct causes iostream to error. -O3 makes it worse. Date: Mon, 9 Mar 2009 00:02:44 -0700 (PDT) Organization: http://groups.google.com Lines: 30 Message-ID: <15d2f26e-6888-4116-88cf-4469052d9a84@e18g2000yqo.googlegroups.com> References: <8b2e65a4-ed73-4367-865f-7f4662faa712 AT o11g2000yql DOT googlegroups DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1236582164 21890 127.0.0.1 (9 Mar 2009 07:02:44 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 9 Mar 2009 07:02:44 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: e18g2000yqo.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7,gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, On Mar 8, 11:33=A0pm, Jim Michaels wrote: > thought people should know about this. =A0this affects iostream, > fstream, ostream, istream, ios.all things related. > I have not had any problems with vector or any of the STL. =A0The STL > seems to be unaffected. > Jim Michaels Try this: http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Variable-Attributes.html#index-= g_t_0040code_007bpacked_007d-attribute-2215 " packed The packed attribute specifies that a variable or structure field should have the smallest possible alignment=97one byte for a variable, and one bit for a field, unless you specify a larger value with the aligned attribute. Here is a structure in which the field x is packed, so that it immediately follows a: struct foo { char a; int x[2] __attribute__ ((packed)); }; "