It is Undefined behaviour as specified in the ISO C++ standard section 6.6.3:
Flowing off the end of a function is
equivalent to a return with no value;
this results in undefined behavior in
a value-returning function.
More Related Contents:
- c++ if specific words from string
- Why use pointers? [closed]
- Variadic template pack expansion
- Is there any advantage of using map over unordered_map in case of trivial keys?
- Why does C++ not have reflection?
- How do I create a random alpha-numeric string in C++?
- Is it safe to link C++17, C++14, and C++11 objects
- C++ alignment when printing cout
- Why does pow(5,2) become 24? [closed]
- C++ standard library and Boehm garbage collector
- Is it safe to fork from within a thread?
- Why isn’t `int pow(int base, int exponent)` in the standard C++ libraries?
- c++ inline function?
- Why does the library linker flag sometimes have to go at the end using GCC?
- What is a glibc free/malloc/realloc invalid next size/invalid pointer error and how to fix it?
- Can I safely use OpenMP with C++11?
- Initial capacity of vector in C++
- Is there any LAME C++ wrapper\simplifier (working on Linux Mac and Win from pure code)?
- Object layout in case of virtual functions and multiple inheritance
- C++ – Why static member function can’t be created with ‘const’ qualifier
- How to build cmake ExternalProject while configurating main one?
- Efficient bitwise operations for counting bits or find the right|left most ones
- How to automatically register a class on creation
- changing the directory from inside a c program under windows using system command
- How to read a JSON file containing multiple root elements?
- How to track memory allocations in C++ (especially new/delete)
- OpenCV on ubuntu 11.10
- Duplicate const qualifier allowed in C but not in C++?
- Sorry, unimplemented: 64 bit mode not compiled in
- Find available network interfaces in C/C++? [closed]