clang++ #pragma's

Started by jcfuller, January 28, 2025, 09:06:08 AM

Previous topic - Next topic

MrBcx

James,

Clang and GCC do not share the same code base. They are entirely separate projects developed by
different groups and have different goals and implementation details.

I'm certain you know that Clang provides several ease-of-use gcc compatibility switches and features.


I wouldn't hesitate using -Wno-deprecated

jcfuller

Kevin,
I get:

clang++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]

when compiling "c" source.

Shouldn't this

#pragma GCC diagnostic ignored "-Wdeprecated"

from the
// *************************************************
//                  GCC and CLANG
// *************************************************
section stop that?

-Wno-deprecated added to my compile line suppress the warning
James