787 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
2
replies
88
views
Utilizing GSL for Intel C++ on Windows without implementing lib flags or pragma or CMake
Using vcpkg on Windows 11, I installed GSL (GNU Scientific Library) with vcpkg install gsl.
Then I did
set INCLUDE=E:\<mypath>\vcpkg\installed\x64-windows\include;%INCLUDE%
set LIB=E:\<mypath&...
4
votes
0
answers
163
views
How to properly use MSVC's undocumented #pragma extern_absolute with functions?
I am looking for information about the following preprocessor #pragma directive:
#include <string>
class Base {
public:
void Test();
};
int main() {
Base b;
b.Test();
return 0;
...
2
votes
1
answer
89
views
Disable Perl warnings for call to remote function
I'm defining some tests for a library I'm using. One of my tests is calling the code in such a way that it produces warnings, which is expected. However, I'd ideally like to suppress these warnings ...
2
votes
3
answers
113
views
Open-MP Parallel for (three-dimensional array)
We are working with the following code:
int i, j, k;
for (i = 2; i < n; i++){ // S1
for (j = 3; j < n - 3; j++){ // S2
for (k = 4; k < n - 4; k++){ // S3
A[...
0
votes
1
answer
64
views
How can I pad the bytes in a section defined by a pragma directive?
So I have these two macros
#define ESTART \
_Pragma("optimize(\"\", off)") \
_Pragma("section(\".secure\", execute, read, write)") \
_Pragma("...
1
vote
1
answer
55
views
sqlalchemy insert PRAGMA statement while dealing with postgresql database
I'm trying to migrate a small table on local SQLite database to a remote postgresql server, but I'm getting error message "(psycopg2.errors.SyntaxError) syntax error at or near "PRAGMA" ...
1
vote
1
answer
63
views
The equivalent of list initialization but with narrowing conversion
I want to provide a function to convert parameters, which are read as long long or long double from XML, to any type constructible from these types with narrowing conversion. But I want to use list ...
0
votes
1
answer
45
views
Does pragma comment link same library multiple times if same comment is written multiple times?
In visual studio, does pragma comment link same library multiple times if written multiple times? Or comments second onwards ignored? I've checked comment but it doesn't seem to be clearly stated.
0
votes
0
answers
58
views
Why HLS C++ code generates non specified input?
I'm learning the basics of High-Level Synthesis (HLS) using AMD/Xilinx tools. Most courses use older tools for the practical examples (Vivado HLS instead of Vitis 2024.2 which I'm using).
This is the ...
1
vote
1
answer
195
views
Pragma is added to header even though I removed it from the code
As per security recommendations, I have removed Pragma settings from our site (Angular JS and ASP.Net), however, I still see it in the response headers, could be that the framework is adding it by ...
2
votes
1
answer
161
views
issues interleaving `#pragma` and `__attribute__` on GCC
Background
Note: This is not important for the question
I have some macros that act as slightly more general version of attributes, that I attach to functions. Depending on the compiler and compiler ...
1
vote
1
answer
89
views
Does 'use warnings' change $^W?
I've been using Getopt::Long and at one point in the code, where I think it should warn(), it doesn't, unless I run with -w.
Upon inspection, the (Getopt::Long) code directly checks the value of $^W. ...
0
votes
1
answer
133
views
How do I tell gcc to shut up about forward declaring struct inside parameter list?
#pragma GCC diagnostic push
#pragma GCC diagnostic ignore ???
int fstat(int handle, struct stat *statbuf);
/* to get struct stat, #include <asm/stat.h> */
#pragma GCC diagnostic pop
I've ...
Joshua's user avatar
- 43.7k
1
vote
2
answers
102
views
Is the C preprocessor part of the C standard?
I just know that #pragma once is not part of the C standard but rather part of the preprocessor.
In that case, does that make the preprocessor not part of the C standard?
So, are the C programming ...
1
vote
1
answer
70
views
`pragma solidity` is giving error, even though I added the latest version
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract BankAccount {
uint private balance;
// Deposit function: adds an amount to the balance
function deposit(uint amount) ...