I just read this post about why new-line warnings exist, but to be honest my team has people working on several different platforms and with several different editors (everyone uses what bests suites them), so the warning has become ubiquitous, and since its not really a warning worth taking care of it's become Noise and makes finding se...
I have a software project in which I sometimes get strange results from small, simple floating point operations. I assume there is something I have missed, and would like some tips about how to debug the following problems:
(the compiler used is MS VC 6.0, that is version 12 of the Microsoft C compiler)
First anomaly:
extern double ...
I am just starting with g++ compiler on LINUX and got some questions on the compiler flags. Here are they
Optimizations
I read about optimization flags -O1,-O2 and -O3 in the g++ manual page. I didn't understood when to use these flags. Usually what optimization level do you use? g++ manual says the following for -O2.
Optimize even...
Hi,
I'm trying to add the output of "git describe" to the about window of my application, so it's easier to find out what version of the application people use.
I can do it by adding the following compiler flag:
-DAPP_VERSION="$(git describe HEAD)"
But since the project is based on qmake, I would like to find a way to put this into th...
Hi, I'd want your input which gcc compiler flags to use when optimizing for Xeons?
There's no 'xeon' in mtune or march so which is the closest match?
...
I am currently dealing with code purchased from a third party contractor. One struct has an unsigned char field while the function that they are passing that field to requires a signed char. The compiler does not like this, as it considers them to be mismatched types. However, it apparently compiles for that contractor. Some Googling has...
There are a lot of optimization settings starting with tree. Some are:
-ftree-builtin-call-dce
-ftree-ccp
-ftree-ch
-ftree-copyrename
-ftree-dce
-ftree-dominator-opts
-ftree-dse
-ftree-ter
What's special about those flags?
...
From the documentation's description, they seem to do the same thing except that "not all systems" support shared and "only some systems" support symbolic (it's unclear if these are the same set of systems):
-shared
Produce a shared object which can then be linked with other objects to
form an executable. Not all systems
su...
Hello,
in my iPhone project I am using some inline asm, which is excluded if the target architecture is the device and not the simulator.
Since some of the inline asm code is arm only and not thumb I need to specify the c flag -marm when compiling it for the iPhone, since it otherwise trys to compile the code with the thumb instruction...
When I retrieve the begin() iterator of a boost::tokenizer, I get a crash in msvcp90d.dll, that says "ITERATOR LIST CORRUPTED", which looks suspiciously like issues I have run into before with the _HAS_ITERATOR_DEBUGGING compiler flag, however I have verified that my program is being compiled with this flag turned off.
Here is the prog...
I am trying to understand why grep built by me is much slower than the one that comes with the system and trying to find what compiler options are used by grep that comes with the system.
OS Version: CentOS release 5.3 (Final)
grep on system:
Version: grep (GNU grep) 2.5.1
Size: 88896 bytes
ldd output:
libpcre.so.0 => /lib64/...
I'm writing a python program that needs to set the environment CFLAGS as needed.
I'm using the subprocess module to perform some operations, but, I'm not sure this is the correct way of doing this.
The script will first set the CFLAGS and then compile some code, so the cflags need to stay put while the code is compiled.
I know there i...
I use Qt for C++ development, and today I produced a .vcproj file from a .pro file.
I noticed under the vcproj project properties, Qt added this flag into the C/C++ -> Command Line -> Additional Options
-Zm200
What is -Zm200?
...
What is compiler flagging for numbers in C#? What is the advantage of this work? I can't understand this concept.
...
Is there a method to automatically find the best compiler options (on a given machine), which result in the fastest possible executable?
Naturally, I use g++ -O3, but there are additional flags that may make the code run faster, e.g. -ffast-math and others, some of which are hardware-dependent.
Does anyone know some code I can put in...
I need some help on compiler flags in c++. I'm using a library that is a port to linux from windows, that has to be compiled with the -malign-double flag, "for Win32 compatibility". It's my understanding that this mean I absolutely have to compile my own code with this flag as well? How about other .so shared libraries, do they have be r...
What's the "DNS_BLOCK_ASSERTIONS" (C compiler flag)?
...
I've been tasked to work on a project that has some confusing attributes.
The project is of the nature that it won't compile for the iPhone Simulator And the iPhone Device with the same compile settings. I think it has to do with needing to be specifically compiled for x86 or arm6/7 depending on the target platform.
So the project's bu...
The GCC manual says:
-fobjc-direct-dispatch
Allow fast jumps to the message dispatcher. On
Darwin this is accomplished via the comm page.
Can I assume this flag eliminates dynamic dispatch? How does it work?
I believe it should be as fast as a C function call if it is linked directly.
...
Hi, I've been having some problems with GWT and SOYC.
Using the maven pluging for gwt: gwt-maven-plugin, how can I pass extra flags to the GWT compiler. I'm trying to set the XsoycDetailed flag, so that I can get a detailed SOYC report. Thanks.
...