From stdcxx-dev-return-6431-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Mon Dec 10 07:09:07 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 50406 invoked from network); 10 Dec 2007 07:09:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2007 07:09:07 -0000 Received: (qmail 18423 invoked by uid 500); 10 Dec 2007 07:08:55 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 18410 invoked by uid 500); 10 Dec 2007 07:08:55 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 18392 invoked by uid 99); 10 Dec 2007 07:08:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Dec 2007 23:08:55 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2007 07:09:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8BF60714277 for ; Sun, 9 Dec 2007 23:08:43 -0800 (PST) Message-ID: <2879631.1197270523558.JavaMail.jira@brutus> Date: Sun, 9 Dec 2007 23:08:43 -0800 (PST) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Updated: (STDCXX-163) ios_base data member layout wastes 2 bytes In-Reply-To: <411784110.1142352326630.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Sebor updated STDCXX-163: -------------------------------- Severity: Inefficiency Affects Version/s: 4.1.2 4.1.4 4.2.0 Fix Version/s: 5.0 This affects all released versions and can't be fixed w/o breaking binary compatibility. Scheduled for 5.0. > ios_base data member layout wastes 2 bytes > ------------------------------------------ > > Key: STDCXX-163 > URL: https://issues.apache.org/jira/browse/STDCXX-163 > Project: C++ Standard Library > Issue Type: Improvement > Components: 27. Input/Output > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0 > Environment: all > Reporter: Martin Sebor > Priority: Minor > Fix For: 5.0 > > > The latest HP aCC beta points out a space inefficiency in the definition of the ios_base class. The next time we break binary compatibility we should rearrange the data mebers to avoid the wasted space. > aCC -c -D_RWSTD_USE_CONFIG -I/build/sebor/aCC-6.07-8s/include -I/build/sebor/dev/stdlib/include -AA +O2 +w +wlint +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 +W4255 /build/sebor/dev/stdlib/src/iostream.cpp > "/build/sebor/dev/stdlib/include/rw/_iosbase.h", line 357: remark #4227-D: > padding struct with 2 bytes to align member "_C_usr" > _C_usr_data *_C_usr; // user data (iword, pword, callbacks) > ^ > $ cat -n /build/sebor/dev/stdlib/include/rw/_iosbase.h | head -n 360 | tail -n 33 > 328 void *_C_rdbuf; // pointer to the associated stream buffer > 329 _RWSTD_STREAMSIZE _C_prec; // current precision > 330 _RWSTD_STREAMSIZE _C_wide; // current width > 331 unsigned _C_fmtfl; // formatting flags > 332 unsigned char _C_state; // stream state > 333 unsigned char _C_except; // active exceptions > 334 > 335 static bool _C_sync_with_stdio; > 336 > 337 private: > 338 > 339 ios_base (const ios_base&); // not defined > 340 ios_base& operator= (const ios_base&); // not defined > 341 > 342 #if __EDG_VERSION__ < 245 > 343 > 344 // working around an EDG eccp 2.3x bug (also derivatives, > 345 // such as MIPSpro, see PR #28631) > 346 public: > 347 struct _C_usr_data; > 348 > 349 #else > 350 > 351 protected: > 352 struct _C_usr_data; > 353 > 354 #endif // EDG < 2.45 > 355 > 356 protected: > 357 _C_usr_data *_C_usr; // user data (iword, pword, callbacks) > 358 locale _C_loc; // locale associated with stream > 359 > 360 friend struct _RWSTD_EXPORT Init; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.