https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85041
Bug ID: 85041 Summary: std::vector::data with -std=c++98 flag Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gbalog at inbox dot ru Target Milestone: --- The code below compiles with the flag -std=c++98, but it shouldn't, because the data() method appeared in c++11. In the implementation of std::vector, there are no checks around this method. With flag -pedantic there are no warnings either. #include <vector> int main() { std::vector<int> v; const int * ptr = v.data(); }