Saturday

gdb command to check the default ISO standard C++ year

Do the following steps.

Open command prompt window.
Compile program with -g flag to generate debug info
> g++ example.cpp -g

Debug program with gdb
> gdb a.exe

Put a breakpoint at main() function
(gdb) b main

Run program which will pause at breakpoint
(gdb) run

gdb information source
(gdb) info source
Output something like the following:
{
Current source file is example.cpp
Compilation directory is C:\Users\xxx\Desktop\cpp_directory
Located in C:\Users\xxx\Desktop\cpp_directory\example.cpp
Contains 21 lines.
Source language is c++.
Producer is GNU C++14 8.1.0 -mtune=core2 -march=nocona -g.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.
}

(gdb) quit
>

No comments:

C++32 (or C++2e), C++ 2032, Cpp 2032, g++ 2032

  Subject: C++ 2032 3 Code example for ? 2 Approximate feature suggestions: - to complete C++29 or C++ 2029 1 Web links, references Wandbox,...