This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/48912] New: [C++0x]Compiler abort silently


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

           Summary: [C++0x]Compiler abort silently
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sscrisk@gmail.com


There is a infinity recursive constexpr function.

constexpr int f()
{
 return f();
}

If evaluate f() compile time. Then compiler aborts silently
and returns 1 to a console.


All codes:

constexpr int f()
{
 return f();
}

int main()
{
 constexpr int i = f();
}


Compile error:
(nothing)


Console:
$ g++4.6 a.cpp
$ echo $?
1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]