Top "Pragma" questions

The #pragma directives offer a way for each compiler to offer machine- and operating system-specific features while retaining overall compatibility with the C and C++ languages.

Use of #pragma in C

What are some uses of #pragma in C, with examples?

c pragma
How to disable GCC warnings for a few lines of code

In Visual C++, it's possible to use #pragma warning (disable: ...). Also I found that in GCC you can override per …

c gcc compiler-warnings pragma
Disable single warning error

Is there a way to disable just a single warning line in a cpp file with visual studio? For example, …

c++ visual-c++ warnings pragma
What does "#pragma comment" mean?

What does #pragma comment mean in the following? #pragma comment(lib, "kernel32") #pragma comment(lib, "user32")

c++ visual-c++ macros pragma
What is the significance of #pragma marks? Why do we need #pragma marks?

What is the purpose of #pragma marks in Xcode? Does their location in .m files matter? Should some #pragma come …

objective-c xcode pragma
How to disable #pragma warnings?

While developing a C++ application, I had to use a 3rd party library which produced a huge amount of warnings …

c++ compiler-construction warnings pragma
What does #pragma once mean in C?

Possible Duplicate: #pragma - help understanding I saw the pragma many times,but always confused, anyone knows what it does?…

c pragma
C++: What does #pragma comment(lib, "XXX") actually do with "XXX"?

My background is C# but I have to maintain some legacy (MS) C++. In that codebase I stumpled across: #pragma …

c++ pragma
Is using #pragma warning push/pop the right way to temporarily alter warning level?

Once in a while it's difficult to write C++ code that wouldn't emit warnings at all. Having warnings enabled is …

c++ visual-c++ warnings compiler-warnings pragma
Selectively disable GCC warnings for only part of a translation unit?

What's the closest GCC equivalent to this MSVC preprocessor code? #pragma warning( push ) // Save the current warning state. #pragma warning( …

c++ c gcc compiler-warnings pragma