[Bug c++/56859] alignas() fails in template

2013-12-11 Thread st at quanttec dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56859

Stephan Tolksdorf st at quanttec dot com changed:

   What|Removed |Added

 CC||st at quanttec dot com

--- Comment #6 from Stephan Tolksdorf st at quanttec dot com ---
The following example still fails with the current trunk GCC. Should this bug
be reopened, or should I file a new one?

template int N  
void test() {
  constexpr int N2 = N;
  typedef int T alignas(N2);
  // error: requested alignment is not an integer constant
}

int main() {
  test4();
  return 0;
}


[Bug c++/56859] alignas() fails in template

2013-05-08 Thread paolo.carlini at oracle dot com


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



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||damien.levac at gmail dot

   ||com



--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com 2013-05-08 
13:00:37 UTC ---

*** Bug 57210 has been marked as a duplicate of this bug. ***


[Bug c++/56859] alignas() fails in template

2013-04-25 Thread jason at gcc dot gnu.org


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



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |RESOLVED

 Resolution||FIXED

 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org

   |gnu.org |

   Target Milestone|--- |4.8.1



--- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2013-04-25 
17:50:52 UTC ---

Fixed.


[Bug c++/56859] alignas() fails in template

2013-04-24 Thread vanboxem.ruben at gmail dot com


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



Ruben Van Boxem vanboxem.ruben at gmail dot com changed:



   What|Removed |Added



 CC||vanboxem.ruben at gmail dot

   ||com



--- Comment #3 from Ruben Van Boxem vanboxem.ruben at gmail dot com 
2013-04-24 19:09:57 UTC ---

Another simple case that fails (even without instantiation) is:



templatesize_type size, size_type alignment

struct aligned_storage

{

  using type = struct { alignas(alignment) unsigned char data[size]; };

};



from http://en.cppreference.com/w/cpp/types/aligned_storage



The error is:



error: requested alignment is not an integer constant

 using type = struct { alignas(alignment) unsigned char data[size]; };

 ^


[Bug c++/56859] alignas() fails in template

2013-04-09 Thread jason at gcc dot gnu.org


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



Jason Merrill jason at gcc dot gnu.org changed:



   What|Removed |Added



 CC||dodji at gcc dot gnu.org,

   ||jason at gcc dot gnu.org



--- Comment #2 from Jason Merrill jason at gcc dot gnu.org 2013-04-09 
17:39:22 UTC ---

Dodji, please take a look at this one too.


[Bug c++/56859] alignas() fails in template

2013-04-06 Thread paolo.carlini at oracle dot com


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



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-04-06

 Ever Confirmed|0   |1



--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2013-04-06 
22:24:43 UTC ---

Confirmed. Note the testcase is missing an instantiation, like just fooint

f;, required to show the problem.