https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
Jonathan Wakely changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #12 from Jonathan Wakely ---
Author: redi
Date: Mon Oct 13 14:08:44 2014
New Revision: 216149
URL: https://gcc.gnu.org/viewcvs?rev=216149&root=gcc&view=rev
Log:
PR libstdc++/57350
* include/std/memory (align): Do not adjust c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #11 from David Krauss ---
No, that code wasn't right either. I'll just leave it at this and a caveat to
the reader:
inline void *align( std::size_t alignment, std::size_t size,
void *&ptr, std::size_t &space ) {
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #9 from David Krauss ---
Whoa, there's a nasty bug there, if alignment > space.
inline void *align( std::size_t alignment, std::size_t size,
void *&ptr, std::size_t &space ) {
std::uintptr_t pn = reinterpret_ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #8 from Jonathan Wakely ---
(In reply to Vladimir Krivopalov from comment #3)
> Any chance to get std::align() implementation included in the coming GCC
> releases?
> What needs to be done for that?
It's too late for GCC 4.9 now.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #7 from David Krauss ---
Haha, it looks like the MSVC devs forgot to subtract 1. Typical.
I did test my code in a real arena allocator, by the way, so that sort of thing
would not have gotten through.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #6 from Vladimir Krivopalov
---
(In reply to David Krauss from comment #5)
> Just re-reading now, std::size_t should be std::uintptr_t, but I don't see
> anything else that could cause UB. The bitwise "negative" arithmetic should
> be
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #5 from David Krauss ---
Just re-reading now, std::size_t should be std::uintptr_t, but I don't see
anything else that could cause UB. The bitwise "negative" arithmetic should be
OK because it's all on unsigned values.
And if GNU styl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #4 from David Krauss ---
Hmm, I recall preparing to submit a patch but not being able to decide which
header to modify.
Here's the aforementioned MIT-licensed code. The MIT license only requires
attribution which is satisfied by the c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
Vladimir Krivopalov changed:
What|Removed |Added
CC||vladimir.krivopalov at gmail
dot c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #2 from Jonathan Wakely ---
(In reply to David Krauss from comment #0)
> C++11 ยง20.6.5 [ptr.align] remains unimplemented.
>
> Several years ago I published what now appears to be a compliant
> implementation, but it was under the MIT
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
--- Comment #1 from David Krauss ---
Oh, here's a link to my version:
http://code.google.com/p/c-plus/source/browse/src/util.h#50
13 matches
Mail list logo