jeudi 20 septembre 2018

GCC: emit warnings when c++11 is used

Given

Cross-platform C++ project that has to build on some ancient windows mobile platforms. However the development is done with GCC.

Problem

Every time that C++11 feature is used it will build locally but fail on the build server (mobile windows).

Question

Is it possible to configure GCC to somehow warn if C++11 feature is used in our code-base (excluding other source-dependencies).

What have you tried?

I know about using -std=c++98 -pedantic, but:

  1. I would like to use the latest compiler standard on Linux platform
  2. There are some linux-only third-party dependencies (build from the source) that require C++11

Aucun commentaire:

Enregistrer un commentaire