Questions tagged [Clang] (28)

1
answer

How to hide the result of execl in C?

Hi all. There is a piece of code. #include <stdio.h> #include <unistd.h> #include <dirent.h> int main(void) { printf("Run script...\n"); execl ("/usr/bin/whoami", "whoami", NULL); printf("Stop script\n"); return 0; } The result will be Run script... sergei Actually questions: 1) How to hide the o...
nola_Simonis asked April 9th 20 at 10:10
3
answers

And again clang: Why (during optimization) the implementation on the signs was worse than using operator [ ]?

In General, are such, have the code:int str_cmp1(const char *s, const char *t) { while (*s == *t && *s != '\0') ++s, ++t; return *s - *t; } int str_cmp2(const char *s, const char *t) { int i; for (i = 0; s[i] == t[i] && s[i] != '\0'; ++i) ; return s[i] - t[i]; } Why сlang optimized the second variant ...
Briana38 asked March 16th 20 at 00:05
1
answer

Why is clang (x86-64 7.0.0) generates worse code (in this example)?

Hello! I study the language, little by little you read different books, and learn how to operate standard library functions. Then try to implement them myself. Use the site cppreference and source codes libc-OpenBSD when I want to compare your code or see how it is done there for comparison using godbolt Compiler Exlorer. S...
carmine_Feeney87 asked March 14th 20 at 16:01
0
answer

Ubuntu install clang by default?

In General I want to repeat the experiment https://clang.debian.net/ there is a test system and installed clang tried to do the instructions apt-get update echo "Install of clang" apt-get update apt-get install --yes --no-install-recommends clang-t unstable echo "Replace gcc, g++ & cpp by clang" cd /usr/bin VERSIONS="...
nettie asked March 13th 20 at 14:40
3
answers

Why the condition if ( a == a) may not be performed for Embedded development?

Went to interview for the position of Embedded C Developer. In the interview asked: Why, how and under what conditions won't be executed if statement?int a; float b; int main(){ if (a == a){ ... (some code) ... } if (b == b){ ... (some code) ... } I was surprised it right. I replied that no one would be so did not wr...
london34 asked March 12th 20 at 10:45
4
answers

Clang-based IDE?

Is there any IDE that use clang not only as a compiler but also as a tool for auto-complete, syntax highlighting, static analysis? The fact that it is very inconvenient to write using the same variadic templates without prompter, and clang, as I understand it, should work properly with all code it can compile. I tried to co...
jorge_Wilderman asked October 8th 19 at 01:21
2
answers

DEB gcc_4 packages.7.1 or clang_3.1?

Good day, does somebody where can we get the DEB packages with gcc 4.7.1 or clang 3.1, which would be without problems installed in Linux Mint? It is desirable that there was a certain (perhaps PPA), preferably supported by, the repository.
yesenia70 asked October 7th 19 at 16:00
1
answer

"Smart" auto-completion and linter in Sublime Text 3?

Good day! The question is quite simple. Is there somebody who managed to have autocompletion with Clang, and also some sort of linter type cpplint? If Yes, then you have left everything as in the tutorial, or had to dance with a tambourine? Working on Ubuntu 12.04 If you need clarification I will be glad to answer.
Agustina_Hirthe asked October 1st 19 at 00:24
0
answer

Build GNUstep libobjc2 to MinGW W64

Already 2 weeks I am suffering with the problem, build libobjc2 from GNUstep under MinGW W64. You want to collect dynamic library for 64bit Windows. To build uses clang 3.4 The first problem is clang uses DWARF2 exception handling on x86_64, while MinGW GCC uses SjLj. That is, when linking object files created by clang with...
merle.Bayer62 asked September 27th 19 at 23:16
5
answers

Development IDE the Russian-speaking community?

Looking for: open-source project IDE for C++, C# under Windows.Important: the IDE is developed by the Russian-speaking community. Counterparts: • monodevelop • sharpdevelop • DevCpp • wxDev-C++ There is an opinion that in Russia programmers need to learn English and to participate in projects in foreign forums. But I see t...
phyllis.Zieme72 asked September 27th 19 at 19:44