Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

compiler front end for C, C++, Objective-C

0
votes
0answers
25 views

Minimal Runtime Sanitization Not Available?

I have clang-5.0 installed from the Ubuntu repositories. I read on the guide clang has a way to compile for production that is enabled with the -fsanitize-minimal-runtime argument to clang. However I ...
2
votes
1answer
74 views

Does an explicit temporary of an integral type qualify as an integral constant expression?

In the following code, int() is an explicit type conversion. #include <iostream> int main() { void* ptr = int(); return 0; } Clang Compiler: source_file.cpp:5:11: error: cannot ...
14
votes
1answer
835 views

Why does LLVM have an assembly-like IR rather than a tree-like IR? Or: why do projects target LLVM IR instead of clang's AST?

Why is LLVM's intermediate representation assembly-like rather than tree-like? Alternatively, why do language implementations target LLVM IR rather than clang's AST? I'm not trying to ask two ...
8
votes
2answers
485 views

Is it wise to use Clang for personal code analysis in a project that builds with gcc?

I started to work on several C projects that are building using gcc. I believe this choice was made for several reasons: Had to cross-compile for arm very early on (I think). Performance is the first ...
1
vote
1answer
64 views

Cross compiling: Share compile steps between different target platforms?

For a C project, I'm upgrading my build process from MingGW-GCC / make and Android Studio under Windows (2 separate processes) to Clang / CMake under Debian 8, using wclang and wine to compile and ...
2
votes
1answer
104 views

How are objects stored in unordered_sets?

I've been doing a bit of research on the subject. I know unordered_sets are hash tables, where the key and value are one and the same. What I'd like to know is how the compiler figures out where in ...
1
vote
1answer
329 views

Why isn't the isa pointer hardwired in Objective-C classes?

I've been studying the Objective-C runtime for some years, and even hacked libobjc a little bit (both Apple's and GNUStep's), and I've been wondering about a design decision on the compilers. Every ...
7
votes
3answers
3k views

C++: Metaprogramming with a compiler API rather than with C++ features

This started out as a SO question but I realized that it is quite unconventional and based on the actual description on the websites, it might be better suited to programmers.se since the question has ...
1
vote
2answers
327 views

How could Clang release under BSD license?

I found that llvm could only generate assembly code. If someone want generate and link assembly code to native executable code, they should use external tool(GNU as/ld, for example. Currently lld is ...
82
votes
5answers
19k views

Clang warning flags for Objective-C development

As a C & Objective-C programmer, I'm a bit paranoid with the compiler warning flags. I usually try to find a complete list of warning flags for the compiler I use, and turn most of them on, unless ...
20
votes
4answers
3k views

GCC vs clang/LLVM — pros and cons of each [closed]

What are the pros and cons of GCC vs clang/LLVM?
6
votes
3answers
3k views

Reason to use mingw win32 headers and libs with LLVM/Clang

Is there any good reason (except "GCC is better") to use the MinGW win32api/headers/libs with LLVM/Clang. Suppose that in two to three years, Clang has matured enough (in C++0x and performance) that ...
10
votes
3answers
2k views

Is Clang/LLVM ready for prime time? [closed]

Clang is able to be used instead of gcc? What your experience on that? What disadvantages there are yet? Performance of compilation is very better than gcc but about performance of code generated ...