Skip to main content

Questions tagged [clang]

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

1 vote
1 answer
219 views

For simplicity, let's say I have the following C project structure: src/ utils/ logger.c logger.h main.c secondary_component.c main.c starts with: #include "utils/logger.h" I would ...
ChaimKut's user avatar
  • 123
2 votes
3 answers
3k views

With 'global variables', I mean Variables on namespace level Static data members in classes Static variables in functions In a big C++ project I would like to have a mechanism (like a compiler option) ...
Borph's user avatar
  • 131
0 votes
1 answer
125 views

I am peeking through the code of torsocks where as you'll notice, the .travis.yml file instructs Travis CI to test against both clang and gcc. compiler: - clang - gcc I'm still learning and this ...
Alex V's user avatar
  • 111
2 votes
1 answer
106 views

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 ...
Jemes's user avatar
  • 133
18 votes
1 answer
4k views

Why is LLVM's intermediate representation (LLVM IR) 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 ...
Praxeolitic's user avatar
  • 1,674
8 votes
2 answers
885 views

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 ...
nathdwek's user avatar
  • 271
1 vote
1 answer
210 views

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 run ...
Engineer's user avatar
  • 781
2 votes
1 answer
278 views

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 ...
moonman239's user avatar
  • 2,063
2 votes
1 answer
647 views

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 ...
paulotorrens's user avatar
13 votes
3 answers
5k views

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 ...
Steven Lu's user avatar
  • 539
1 vote
2 answers
482 views

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 ...
sunny2016's user avatar
  • 113
103 votes
5 answers
24k views

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 ...
Macmade's user avatar
  • 1,156
27 votes
4 answers
14k views

What are the pros and cons of GCC vs clang/LLVM?
yodie's user avatar
  • 704
7 votes
4 answers
5k views

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 ...
rubenvb's user avatar
  • 590
9 votes
3 answers
2k views

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 ...
AArteDoCodigo.com.br - Maniero's user avatar