public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
@ 2003-06-04 14:20 ` pinskia@physics.uc.edu
  2003-06-04 22:13 ` john.carter@tait.co.nz
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-04 14:20 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |deffeg@ecse.rpi.edu


------- Additional Comments From pinskia@physics.uc.edu  2003-06-04 14:20 -------
*** Bug 11073 has been marked as a duplicate of this bug. ***



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
  2003-06-04 14:20 ` [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs pinskia@physics.uc.edu
@ 2003-06-04 22:13 ` john.carter@tait.co.nz
  2003-06-05  1:09 ` bkoz@gcc.gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: john.carter@tait.co.nz @ 2003-06-04 22:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246



------- Additional Comments From john.carter@tait.co.nz  2003-06-04 22:13 -------
You can't really generate a test case for it. 

The -Wcast-align is a bit like -Wuninitialized. You need a super magical proof
engine to decide whether a cast align problem really is a problem or not. I
suspect (can't prove) that this cast align warning simply isn't a real problem. 

I believe the programmer has in fact done the right thing, the compiler is just
warning that he is performing a possibly incorrect operation here.

Partly the right answer is to ignore the problem, except being in a template
library it produces such a flood of warnings as to render the warning useless.

I suspect if you go forth bravely and fix and compile and fix starting from my
suggestion of changing the type of _S_start_free, you will eventually converge.
Given the fairly good coverage of test cases it shouldn't break anything else.
Port the changes back to linux-x*86 and use valgrind to double check.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
  2003-06-04 14:20 ` [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs pinskia@physics.uc.edu
  2003-06-04 22:13 ` john.carter@tait.co.nz
@ 2003-06-05  1:09 ` bkoz@gcc.gnu.org
  2003-06-05  1:35 ` john.carter@tait.co.nz
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: bkoz@gcc.gnu.org @ 2003-06-05  1:09 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246



------- Additional Comments From bkoz@gcc.gnu.org  2003-06-05 01:09 -------

Can you try after this patch on mainline or gcc-3_3-branch please?

2003-05-20  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>

	* include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
	Cast via void* to avoid -Wcast-align warnings.
	(__default_alloc_template::_S_refill): Likewise.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (2 preceding siblings ...)
  2003-06-05  1:09 ` bkoz@gcc.gnu.org
@ 2003-06-05  1:35 ` john.carter@tait.co.nz
  2003-06-08  8:00 ` dhazeghi@yahoo.com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: john.carter@tait.co.nz @ 2003-06-05  1:35 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246



------- Additional Comments From john.carter@tait.co.nz  2003-06-05 01:35 -------
Subject: Re:  Cast increases alignment in
	__default_alloc_template on Sparcs

On Thu, 2003-06-05 at 13:09, bkoz@gcc.gnu.org wrote:

> 	* include/bits/stl_alloc.h (__default_alloc_template::_S_chunk_alloc):
> 	Cast via void* to avoid -Wcast-align warnings.
> 	(__default_alloc_template::_S_refill): Likewise.

Casting via void is rather evil. I would prefer to see a solution based
on changing the type of _S_start_free to _Obj *, or using a union type
consisting of _Obj and char.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (3 preceding siblings ...)
  2003-06-05  1:35 ` john.carter@tait.co.nz
@ 2003-06-08  8:00 ` dhazeghi@yahoo.com
  2003-06-08 22:24 ` john.carter@tait.co.nz
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-08  8:00 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


dhazeghi@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
  GCC build triplet|                            |sparc-sun-solaris2.7
   GCC host triplet|                            |sparc-sun-solaris2.7
 GCC target triplet|                            |sparc-sun-solaris2.7


------- Additional Comments From dhazeghi@yahoo.com  2003-06-08 08:00 -------
Aside from the stylistic gripe, does the patch fix the problem? Thanks,

Dara


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (4 preceding siblings ...)
  2003-06-08  8:00 ` dhazeghi@yahoo.com
@ 2003-06-08 22:24 ` john.carter@tait.co.nz
  2003-06-11 15:25 ` dhazeghi@yahoo.com
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: john.carter@tait.co.nz @ 2003-06-08 22:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246



------- Additional Comments From john.carter@tait.co.nz  2003-06-08 22:24 -------
> apart from the stylistic gripe, does the patch fix the problem?

That's sort of the point isn't it? Does it fix the problem? Don't know. It
certainly will quash the warning, but does it quash a valid warning as well?
Don't know. 

However if you work with properly align pointers all the way through, with the
warnings on, you have a fairly strong proof that it is correct (w.r.t. alignment)

The correct answer is to do as I said, work with (_Obj *)'s instead of (char *)
and the problem will go away.

The solution in the repository now has the virtue of being there, and I no
longer use sparc's anyway, so I'll not be coding it myself. When a 64 bit
machine lands on my desk in a year or three, I'll worry (intensely) about it
again...


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (5 preceding siblings ...)
  2003-06-08 22:24 ` john.carter@tait.co.nz
@ 2003-06-11 15:25 ` dhazeghi@yahoo.com
  2003-06-18 17:17 ` pinskia at physics dot uc dot edu
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-11 15:25 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


dhazeghi@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz@gcc.gnu.org


------- Additional Comments From dhazeghi@yahoo.com  2003-06-11 15:25 -------
Well, my question was more along the lines of "is this a defect or an enhancement request," and 
since this isn't really my area of expertise, I'll defer to the experts. Ben, any suggestions what to do 
with this bug report? Thanks,

Dara


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (6 preceding siblings ...)
  2003-06-11 15:25 ` dhazeghi@yahoo.com
@ 2003-06-18 17:17 ` pinskia at physics dot uc dot edu
  2003-08-09 17:42 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-18 17:17 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-18 17:06:30
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-18 17:06 -------
This should not be in waiting because it is a bug nad we are waiting for a maintain 
respone, not the submitter's.


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (7 preceding siblings ...)
  2003-06-18 17:17 ` pinskia at physics dot uc dot edu
@ 2003-08-09 17:42 ` pinskia at gcc dot gnu dot org
  2005-01-20 14:51 ` pcarlini at suse dot de
  2005-04-20  2:12 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-09 17:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (8 preceding siblings ...)
  2003-08-09 17:42 ` pinskia at gcc dot gnu dot org
@ 2005-01-20 14:51 ` pcarlini at suse dot de
  2005-04-20  2:12 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 11+ messages in thread
From: pcarlini at suse dot de @ 2005-01-20 14:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-01-20 14:51 -------
The original problem has been fixed and the HP/SGI pool_allocator is in deep
bug fix only mode now.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


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

* [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs
       [not found] <20021016151600.8246.john.carter@tait.co.nz>
                   ` (9 preceding siblings ...)
  2005-01-20 14:51 ` pcarlini at suse dot de
@ 2005-04-20  2:12 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-20  2:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8246


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

end of thread, other threads:[~2005-04-20  2:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20021016151600.8246.john.carter@tait.co.nz>
2003-06-04 14:20 ` [Bug libstdc++/8246] Cast increases alignment in __default_alloc_template on Sparcs pinskia@physics.uc.edu
2003-06-04 22:13 ` john.carter@tait.co.nz
2003-06-05  1:09 ` bkoz@gcc.gnu.org
2003-06-05  1:35 ` john.carter@tait.co.nz
2003-06-08  8:00 ` dhazeghi@yahoo.com
2003-06-08 22:24 ` john.carter@tait.co.nz
2003-06-11 15:25 ` dhazeghi@yahoo.com
2003-06-18 17:17 ` pinskia at physics dot uc dot edu
2003-08-09 17:42 ` pinskia at gcc dot gnu dot org
2005-01-20 14:51 ` pcarlini at suse dot de
2005-04-20  2:12 ` pinskia at gcc dot gnu dot org

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