[Bug libstdc++/57350] std::align missing

2014-10-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug libstdc++/57350] std::align missing

2014-10-13 Thread redi at gcc dot gnu.org
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

[Bug libstdc++/57350] std::align missing

2014-02-04 Thread potswa at mac dot com
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 ) {

[Bug libstdc++/57350] std::align missing

2014-02-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug libstdc++/57350] std::align missing

2014-02-03 Thread potswa at mac dot com
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

[Bug libstdc++/57350] std::align missing

2014-02-02 Thread redi at gcc dot gnu.org
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.

[Bug libstdc++/57350] std::align missing

2014-02-01 Thread potswa at mac dot com
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.

[Bug libstdc++/57350] std::align missing

2014-02-01 Thread vladimir.krivopalov at gmail dot com
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

[Bug libstdc++/57350] std::align missing

2014-02-01 Thread potswa at mac dot com
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

[Bug libstdc++/57350] std::align missing

2014-02-01 Thread potswa at mac dot com
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

[Bug libstdc++/57350] std::align missing

2014-02-01 Thread vladimir.krivopalov at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350 Vladimir Krivopalov changed: What|Removed |Added CC||vladimir.krivopalov at gmail dot c

[Bug libstdc++/57350] std::align missing

2013-05-21 Thread redi at gcc dot gnu.org
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

[Bug libstdc++/57350] std::align missing

2013-05-21 Thread potswa at mac dot com
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