[Bug other/56860] New: Texinfo bug in doc/cppopts.texi

2013-04-06 Thread david.narvaez at computer dot org


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



 Bug #: 56860

   Summary: Texinfo bug in doc/cppopts.texi

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: other

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: david.narv...@computer.org





Could revision 192887 be backported to 4.7.2?


[Bug c++/56871] New: [c++11] Specialization of constexpr Templated Function

2013-04-07 Thread david.narvaez at computer dot org

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

 Bug #: 56871
   Summary: [c++11] Specialization of constexpr Templated Function
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: david.narv...@computer.org


Consider the code below

template constexpr int foo(T) { return 0; };
template<> int foo(int) { return 1; }

Compiling this code with g++-4.8.0 -Wall -c -std=c++0x bug.cpp throws the
following error:

bug.cpp:2:23: error: redeclaration ‘constexpr int foo(T) [with T = int]’
differs in ‘constexpr’
 template<> int foo(int) { return 1; }
   ^
bug.cpp:1:36: error: from previous declaration ‘constexpr int foo(T) [with T =
int]’
 template constexpr int foo(T) { return 0; };

Yet, the C++ standard (section 7.1.5) says that an explicit specialization can
differ from the template declaration with respect to the constexpr specifier.