Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: argument -pedantic, forcing local preprocessing - even with -std flag specified #630

Open
mliszcz opened this issue Mar 18, 2024 · 0 comments

Comments

@mliszcz
Copy link

mliszcz commented Mar 18, 2024

I noticed this warning with gcc 12.2.0:

ICECC[13224] 2024-03-18 14:34:38: argument -pedantic, forcing local preprocessing (try using -std=cXX instead of -std=gnuXX)

Indeed we have -Wpedantic BUT we also have -std=c++17.

The check is implemented here:

icecream/client/arg.cpp

Lines 891 to 897 in 9d397ef

// -pedantic doesn't work with remote preprocessing, if extensions to a named standard
// are allowed. GCC allows GNU extensions by default, so let's check if a standard
// other than eg gnu11 or gnu++14 was specified.
if( seen_pedantic && !compiler_is_clang(job) && (!standard || str_startswith("gnu", standard)) ) {
log_warning() << "argument -pedantic, forcing local preprocessing (try using -std=cXX instead of -std=gnuXX)" << endl;
job.setBlockRewriteIncludes(true);
}

The standard variable is declared on top but never assigned:

const char *standard = nullptr;

Is remote preprocessing supposed to work as described in the warning message/comment? If yes and it was overlooked, I can send a PR.

mliszcz added a commit to mliszcz/icecream that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant