pragma Questions
1
I would like to disable specific known warnings in C++ code coming from a library header when compiling my own code. There are clang and gcc specific methods for disabling the warnings. The way thi...
3
Solved
I am including a file from a third-party library that raises an error that can be downgraded to a warning with -fpermissive. But because I do not want to "pollute" my compilation log with...
5
Solved
The syntax for disabling warnings is as follows:
#pragma warning disable 414, 3021
Or, expressed more generally:
#pragma warning disable [CSV list of numeric codes]
Is there a list of these n...
Coronal asked 2/6, 2009 at 22:28
8
Solved
Is there something similar to explicit code regions for folding in Qt Creator:
#pragma region Region_1
void Test() {}
void Test2() {}
void Test3() {}
#pragma endregion Region_1
I can see folding...
Quinlan asked 2/7, 2012 at 14:7
3
I like to have clean, "0 warnings" - projects in C#. This includes my project having XML comments for every public property and class.
Now I use entity framework with migrations (code first). The ...
Analcite asked 21/5, 2015 at 8:2
3
Solved
I have found the following code when refactoring:
#ifndef TARGET_OS_LINUX
#pragma once
#endif
Can anyone help me understand #pragma once?
What, when, where, and why is it used? Do you have an exam...
Urethritis asked 11/8, 2009 at 23:25
2
Solved
I'm trying to assess the performance differences between OpenCL for AMD and Nvidia GPUs. I have a kernel which performs matrix-vector multiplication. I'm running the kernel on two different systems...
Cheston asked 19/11, 2012 at 20:11
3
I have used c# to create a First Project.
I have many warning errors and all these warning errors are to be single Error(Internal compiler error. See the console log for more information.)
For R...
Ornamentation asked 30/3, 2013 at 5:3
4
I need to dramatically improve writing speed for SQLite (or maybe suggest another solution for this outside of SQLite).
Scenario :
I have 71 Columns with 365 * 24 * 60 values each. (365 = days)
I ...
Wurth asked 6/8, 2021 at 9:5
7
Solved
I want to disable a specific compiler warning with nvcc, specifically
warning: NULL reference is not allowed
The code I am working on uses NULL references are part of SFINAE, so they can't be ...
Fingerling asked 12/2, 2013 at 11:5
6
Solved
As the title says: Is there a pragma directive for include directories using VS20** C++? I think about something like:
#pragma comment(include, "..\externals\blah\includes\")
So that I can use i...
Euphemiah asked 15/8, 2011 at 19:8
3
Solved
In existing code I saw #pragma once be used after header #includes
//Some_Header.h
#include "header1.h"
#include "header2.h"
#pragma once
//implementations
Instead of
//Some_...
2
I'm creating a GCC plugin.
I'm trying to create a plugin for a specific loop transformation - unroll loop exactly N (parameter given) times.
I have installed plugins correctly and I can successful...
Edana asked 2/3, 2014 at 11:48
3
The command pragma table_info('tablename') lists the columns information and pragma foreign_key_list('tablename') the foreign keys.
How can I display other constraints (check, unique) of a table?
O...
Quintinquintina asked 9/3, 2012 at 14:51
3
Solved
I created a header file. Something simple as follows.
#pragma once
#include <iostream>
template<typename T>
void say(T t) {
std::cout << t << std::endl;
}
and then use...
Iolaiolande asked 12/6, 2019 at 13:42
3
Solved
Can somebody tell me a workaround for #pragma once directive support for various compilers?
I want to use in my header something like:
#if _MSC_VER > ... || __GNUC__ > ... || ...
#pragma o...
5
Solved
I have a piece of code which is generating lots of warnings (deprecated API)
Using clang* I could do:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations&...
15
Solved
I've read that there is some compiler optimization when using #pragma once which can result in faster compilation. I recognize that is non-standard, and thus could pose a cross-platform compatibili...
Anorthite asked 24/4, 2009 at 20:50
2
Solved
Current status
Bug filed in gcc bugtracker (includes simple testcase): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66234
I'm currently porting some code to a new platform and toolchain, which ...
Quimper asked 15/5, 2015 at 8:51
3
Is there a Visual Studio preprocessor equivalent of #pragma mark found in XCode? Here's why I ask:
This is on Windows.
This is on Mac.
I know of #region in C#, but nothing of similar functio...
Indebtedness asked 12/3, 2013 at 11:42
3
Solved
In MSVC & C#, #pragma region can be used to label a code section.
Similarly, in GCC/Clang, #pragma mark can accomplish the same thing.
Is it possible to define a single macro such as CODELABEL...
Poise asked 8/9, 2015 at 23:34
3
Solved
I know it starts with #, and it follows the preprocessing directives format. But does the preprocessor really care about it? The #pragma pack, #pragma once, and all other directives I know, are all...
Roughneck asked 7/9, 2020 at 8:13
11
Solved
Is there a way to disable just a single warning line in a cpp file with visual studio?
For example, if I catch an exception and don't handle it, I get error 4101 (unreferenced local variable). Is ...
Passant asked 23/8, 2011 at 10:6
3
Solved
Just wondering whether pragmas such as foreign_keys = OFF, and VACUUM would be undone if included in a transaction which gets rolled back.
The online documentation doesn't seem to cover this...
Corcoran asked 9/9, 2011 at 9:39
1
Solved
I would like to use clan-tidy. The program should check if I do have header guards, which is why I set the flag llvm-header-guard. Unfortunately this checks if the header guards are llvm-style, whi...
Burka asked 24/4, 2020 at 8:45
1 Next >
© 2022 - 2025 — McMap. All rights reserved.