Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
63 views

On windows, using check_ipo_supported CMake function gives the following results: compiler generator check_ipo_supported msvc NMake Makefiles TRUE g++ (from MSYS2) MinGW Makefiles TRUE clang++ (from ...
Oersted's user avatar
  • 3,834
2 votes
1 answer
141 views

Recently i've been working on some project with GNU arm compiler for C++ project. I've configured clangd to use this compiler with query-driver as clangd documentation recommends. The problem is ...
aleks's user avatar
  • 107
1 vote
1 answer
51 views

I am learning to work with the clang AST while developing a refactoring tool. I'm using a clang::ast_matchers::dynamic::DynTypedMatcher created using the clang::ast_matchers::dynamic::Parser::...
Kristen777's user avatar
-5 votes
1 answer
207 views

I have an existing c++ project that compiles fine with msvc, and I'm trying to get it to compile in Visual Studio 2022 with LLVM (clang-cl). At the moment I'm using C++ Language Standard Preview ISO C+...
dts's user avatar
  • 223
2 votes
3 answers
239 views

When compiling my program using a recent version of OpenVDB library by Clang in C++20 mode, I get the error: error: use of the 'assume' attribute is a C++23 extension I see that it is due to the ...
Fedor's user avatar
  • 24.7k
14 votes
2 answers
322 views

Consider this simple code. struct Foo { template <typename T> struct Bar { ~Bar(); }; }; with the out-of-line implementation template <typename T> Foo::Bar<T>::~...
Jody Hagins's user avatar
  • 28.6k
1 vote
1 answer
107 views

I’m working on a legacy C++ codebase that ships with its own Clang 16 inside a thirdparty/llvm-build-16 folder. On our new Ubuntu 22.04 build system, this bundled compiler fails to run because it ...
aniket's user avatar
  • 21
3 votes
1 answer
114 views

On my Apple M2 (ARM64-apple-darwin) I have the following C++ code stored in the file hello_world.cpp in some directory called code. I want to be able to compile it using both Clang and GCC, but ...
davidtschan's user avatar
0 votes
0 answers
34 views

In my own "native" Python module I declare a new type this way: PyTypeObject calculatorType = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "My.Calculator", .tp_basicsize ...
Mikhail T.'s user avatar
  • 4,266
2 votes
1 answer
109 views

MSVC has a very useful flag /SOURCELINK. This allows you to tell where in your versioning system the sources are stored, such that they can be downloaded. For example: (Also holds for C++) { "...
JVApen's user avatar
  • 11.5k
5 votes
2 answers
161 views

I am porting a large codebase from Linux/g++ to MacOS/Clang. I hit this compiler error in multiple places in Clang (where g++ builds successfully and does the right thing at run time): error: ...
barnabas's user avatar
  • 157
0 votes
1 answer
189 views

The clang compiler shipping with Xcode 26 does not support sized deallocation: void* p = operator new(100); // [...] operator delete(p, 100); // error: no matching function for call to 'operator ...
Tobi's user avatar
  • 2,809
1 vote
0 answers
39 views

The design document for Hardware-assisted AddressSanitizer does not document whether or not runtime suppressions are possible using the HWASAN_OPTIONS environment variable. Assuming a program compiled ...
Dalzhim's user avatar
  • 2,098
0 votes
1 answer
241 views

I am developing a mobile app in .NET Maui with .NET 8.0 for both Android and iOS using the latest Release of Visual Studio 2022 and a Windows PC. Everything worked very well until this week. I can no ...
BeRo's user avatar
  • 194
2 votes
2 answers
114 views

I noticed that the following program optimizes to no instructions at all on recent versions of clang, with -ffast-math and -O1 and higher: #include <cassert> #include <limits> int main() {...
Alexander Torstling's user avatar
0 votes
1 answer
110 views

I am trying to get Negative Capabilities working, as described in the link. I have the following code, which is based on the example in the link provided. (I changed their example mutex, Mutex, which ...
CoffeeTableEspresso's user avatar
-3 votes
1 answer
127 views

Platform: aarch64, android 14, clang 20.1.6 (latest version), llvm 20.1.6, kernel 5.4.254-qgki-ga443 Code: int start_game(void) { } int main(int argc, char **argv) { start_game(); } Problem: My ...
Two Spikes's user avatar
1 vote
1 answer
169 views

By default, clang defines some SIMD related macros: ~ $ 0 clang++ -dM -E -x c /dev/null | grep -i sse #define __SSE2_MATH__ 1 #define __SSE2__ 1 #define __SSE_MATH__ 1 #define __SSE__ 1 These can be ...
Dorian's user avatar
  • 632
0 votes
0 answers
20 views

I am working on a program that outputs a C++ AST to a form that can be injested by the Rocq theorem prover. For many things, this works well, but Clang seems to compute some information lazily and ...
Gregory's user avatar
  • 1,305
1 vote
0 answers
226 views

I’m trying to build a React Native iOS project in Xcode (Debug-iphonesimulator) but I keep getting “ScanDependencies” failures before compilation even begins: ScanDependencies /Users/<username>/...
Miggy Aoanan's user avatar
10 votes
1 answer
228 views

I recently encountered an interesting C++ code example that compiles with Clang (-std=c++20) but fails with GCC and MSVC. The code involves operator overloading and friend function declarations. Code ...
Caesium1337's user avatar
4 votes
1 answer
144 views

I am compiling an application on macOS 15.4 with Xcode 16.1. Upon examining the object files the compiler produces, some of the symbols have [abi:de180100] appended to them. This suffix is not in the ...
fbrereto's user avatar
  • 36.1k
5 votes
1 answer
196 views

I have some code which is showing odd behavior when std::is_sorted() is called twice in a row; the result changes! The fist call returns false and the second call returns true. This happens with the ...
Michael Conlen's user avatar
13 votes
0 answers
378 views

#include <type_traits> template <class T> concept floating_point = std::is_floating_point_v<T>; template <class T> concept integral = std::is_integral_v<T>; template &...
yaito3014's user avatar
  • 131
2 votes
0 answers
348 views

I'm trying to remove all clang-tidy warnings in my C++ project. But I get alternating modernize-deprecated-headers and misc-include-cleaner warnings. For example: I use open_memstream in a file, so I ...
DeZe's user avatar
  • 23
0 votes
1 answer
125 views

I am trying to build a simple C++ program which includes the standard library header <iostream>, on a Mac. When I compile my program in VS Code, I get the error message: include errors detected. ...
mjrmarquis's user avatar
4 votes
1 answer
187 views

I'm using GCC 14 and Clang 21. Why is the next C++23 code refused by GCC but Clang compiles without problems ? Both seems to support this functionality of C++20 and I'm using C++23. I think I've read ...
informaticienzero's user avatar
-2 votes
1 answer
72 views

namespace ns { class MyClass { private: int value; MyClass(int val) : value(val) {} friend MyClass operator"" _myudl(unsigned long long int val); // Friend UDL declaration ...
Ashcoll Ash's user avatar
0 votes
0 answers
30 views

I've been doing some tests to try to use LLVM to build a big 20 year old project developed with GCC. Among the vast number of issues one of the problems is with old Qt headers. We're building with -...
Paul Floyd's user avatar
  • 7,180
0 votes
0 answers
30 views

I am trying to compile a CFD code on a Mac. The code is parallelized using MPI, and is written with a combination of C++ and Fortran. In addition, it runs a Python interpreter to handle IO tasks via ...
user3646557's user avatar
3 votes
0 answers
62 views

Here is the test code: #include <type_traits> enum class ShaderType:unsigned{ Vertex = 0, Fragment = 1, }; template<ShaderType type> struct ShaderTypeHolder{ static constexpr ...
Shenghua Lin's user avatar
0 votes
0 answers
137 views

Trying to set the include directory path for llvm build Hi, I am trying to build llvm with snmalloc allocator and as per the cmake options and instructions, I have set LLVM_INTEGRATED_CRT_ALLOC flag ...
Jenet Scaria's user avatar
1 vote
0 answers
16 views

I have been dealing with a lot of errors in my C++ code and then just realized I am running c++ 98. I am writing this for some help with updating it to c++20 or 17. From everything I have read, I have ...
Marcus Hauen- Limkilde's user avatar
14 votes
1 answer
414 views

My colleague ports a C++ program with ranges on macOS, and observes an unexpected compilation error. After maximum simplification, the example program looks like this: #include <optional> #...
Fedor's user avatar
  • 24.7k
0 votes
0 answers
138 views

I’m currently testing an interesting ARM64-to-x86_64 emulator implemented within the Xcode iOS Simulator. The goal is to enable Intel Macs to run ARM64 iOS binaries. Part of the emulator’s code relies ...
Jesus Martinez's user avatar
3 votes
2 answers
215 views

It is known that some linkers do not report multiple definition errors when there are multiple definitions in static libraries. See for example here: Multiple definition within static library or here: ...
Benjamin Bihler's user avatar
0 votes
0 answers
58 views

I've encountered a bug when using Clang[1] with libomp[2] whereby using omp_priv = omp_orig in the initializer of a custom OpenMP reduction silently gives erroneous output. For example: /* file.cpp */ ...
Anti Earth's user avatar
  • 4,941
1 vote
2 answers
90 views

Clang tells me there is no viable conversion from the return value of boost::beast::http::async_write with completion token boost::asio::as_tuple(boost::asio::deferred) to awaitable<tuple<boost::...
climb4's user avatar
  • 326
1 vote
1 answer
324 views

I have a simple C++ program that does nothing: int main() { return 0; } I am trying to build this program completely statically using the following command: g++ -o c c.cc -static Everything works ...
Mehrab's user avatar
  • 19
0 votes
0 answers
31 views

I've tried to run my project, but it's complaining about not being able to find a header. The reason it can't find it is because instead of searching my ./include directory, it's loading a framework ...
user29149008's user avatar
4 votes
1 answer
129 views

While I was playing with constexpr function, I faced the following issue. Accessing inactive member of union is undefined behaviour I know. But there is one exception for this rule. According to C++23 ...
Ahmet Dundar's user avatar
0 votes
0 answers
79 views

I'm not sure if it is specified in the standard that advance/dereference of standard container iterator are noexcept. GCC and MSVC consistently make them noexcept for all standard containers. But ...
wanghan02's user avatar
  • 1,339
1 vote
0 answers
119 views

Assume the following function: const std::vector<std::unique_ptr<T>>& Foo::bar(); I'd like to refactor it to: const std::vector<T>& Foo::bar(); And then, I'd like to ...
Semin Park's user avatar
2 votes
0 answers
195 views

Was working on a namer_app example based on the video below. I created a new project to check as the dart sdk wasn't being referenced in the initial app: import 'package:integration_test/...
Brock Sawlor's user avatar
2 votes
2 answers
198 views

I have a C++20 program that can be successfully built in Ubuntu 20 with GCC 10 or in Visual Studio 2019. And now I need to compile it for macOS 13.7.2 x64 (currently available on GitHub-hosted runner),...
Fedor's user avatar
  • 24.7k
0 votes
0 answers
63 views

I am new to c++ and created first program, it compiles and works on my machine but when i sent it to a friend they got 2 errors, basically: libgcc_s_seh-1.dll not found libwinpthread-1.dll not found ...
Gyanbu's user avatar
  • 33
0 votes
1 answer
40 views

I'm exploring the LLVM/Clang source code and interested in understanding how LLVM distinguishes between clang and clang++ commands, knowing that clang++ is often considered an alias of clang. Which ...
Henry's user avatar
  • 587
-5 votes
1 answer
358 views

Trying compile my project with gcc is success. When trying to do so with any clang-based compiler the following error occur: [build] /usr/bin/clang++ -I/mnt/40ab93ed-5db8-4e22-a055-9775c3e5b937/ISC-...
Sinfolke's user avatar
1 vote
2 answers
159 views

Mac M1. I learn C++ by Bjarne Stroustrup's book. He show the similar example in his "Programming. Principles and Practice Using C++" book (chapter 5.6.2). Also he writes this exception (...
Andrey Bushman's user avatar
3 votes
1 answer
612 views

Code pasted below: auto myComp = []( std::array<const string, 3> &a, std::array<const string, 3> &b ) { if ( a[0] == b[0] && a[1] == b[1] && a[2] == b[2] ) { ...
PkDrew's user avatar
  • 2,301

1
2 3 4 5
43