Can optimizing compiler delete infinite loops, which does not changes any data, like
while(1)
/* noop */;
From analyzing a data flow graph compiler can derive, that such loop is "dead code" without any side effects.
Is deleting of infinite loops prohibited by C90/C99 standards?
Does C90 or C99 standards permit compiler to deletin...
I have an application that uses the winInet classes - #include <afxinet.h> and the wininet.dll
I would like to statically link the WinInet function calls in my application as well as the dll, so I followed these steps. I then copied the wininet.dll into my project directory, as I read here.
Upon building I get the following error -...
i already downloaded a haru library but it seems i can't find the lib folder for me to link the library of haru to my compiler (dev c++)..
can anyone tell me on what forlder of libharu will be added to my compiler directory for me to not have a 'linker error' when i run the sample demo of haru..
...
Maybe someone knows what this means?
error: can't exec '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2' (No such file or directory)
I wanted to use LLVM GCC 4.2 compiler because an Apple guy said that's the best one. I guess LLVM GCC 4.2 does not work with iPhone OS 2.2.1 framework?
...
Hi guys,
My col is planning to conduct a online coding competition..
Im now looking for a framework that checkes user's code and returns the appropriate result..
Only C,C++ support is enough..
-Dinesh
...
Does anyone know of a good Java to C cross compiler?
Do they work well?
...
I have a .Net app running in IIS6. The app dlls are compiled against the 3.5 framework, which is installed on the server. The app works. I hit an aspx page that has no codefile; it is an .aspx page only, which has inline code in tags. Code declares auto properties as such:
protected String PlaylistUrl { get; set; }
When I request the...
I have some questions about synthesized properties in Objective-C. The full list follows, but the basic question is this: How does the compiler ensure that the ivars for synthesized properties are properly released, even though my code may or may not include release methods in dealloc?
Note: I decided not to post these as individual que...
Should we catch errors while parsing general purpose language as early as possible (in Lex) or where it is more convenient and give us more information (in Yacc)? How various languages solve this problem?
...
I have a flash project; it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought we were ready - I thought it was time. The new Jenine was better in every way - she had lost some code bloat, she had decoupled herself from a...
Does the VB.NET 2008 compiler selectively optimize Select Case Statements?
For example, a Select Case Statement with a sufficient quantity of integer cases could be organized as a binary search.
I ask this because I am curious whether or not I should opt for a Select Case in place of If Statements with multiple Else If's where integer...
I have seen debug printfs in glibc which internally is defined as (void) 0, if NDEBUG is defined. Likewise the __noop for Visual C++ compiler is there too. The former works on both GCC and VC++ compilers, while the latter only on VC++. Now we all know that both the above statements will be treated as no operation and no respective code w...
I remember a few years ago(2002) there was a multipartite virus that could be run natively on linux and windows. I don't know if a compiler could be specially craft an executable so that it could be read as both ELF and PE, so that the os would start executing at different entry points. Or a program that could merge two programs, one com...
How are those different Method types handled in memory.
I found two different explanations to this:
Static methods are only once in memory, whereas instance methods are in memory multiple times, one for each instance to handle the references to membervariables correctly in each instance.
All methods are only once in memory and instanc...
I am fairly new to developing C/C++ code in MSVS but one of the things that has already confused me is why, after adding a set of source and header files to my project such that they show up respectively under the MSVS folders 'Source Files' and 'Header Files', do I subsequently have to tell the compiler where my header files are under '...
Hello,
I fail to compile a C++ project for mobile device with Windows Mobile (Windows CE-based) operating system and Visual C++ compiler from Visual Studio fails with:
Error 1 fatal error C1083: Cannot open include file: 'io.h'
EDIT
I am trying to compile the SQLite amalgamation, the shell.c file includes the call to this io.h bu...
Hello
I have a file, compiled by SUNWspro (Sun pro complier) for SPARC/Solaris. How can I detect version of compiler used to build this binary?
...
What is the following error caused by? I did not make any significant changes and suddenly it started appearing:
Linking /Users/JimB/Desktop/iPhone Dev/Games4Kids/build/Debug-iphonesimulator/ETFanClub.app/Games4Kids(1 error)
duplicate symbol .objc_category_nameNSString_HTTPExtensions in (path)ViewController3 and (path)ViewController1...
A few days back, while writing an answer for this question here on overflow I got a bit surprised by the C# compiler, who wasn’t doing what I expected it to do. Look at the following to code snippets:
First:
object[] array = new object[1];
for (int i = 0; i < 100000; i++)
{
ICollection<object> col = (ICollection<object>)array;
...
I download and tried it today.
It compiles my project but "suncc" is even slower then "gcc" which is famous for its leisureliness. I just -xO1 which i thought should do no optimizations. I have a lot of inline declared C functions. Is there a way to disable the inlining or anything else to make it compile faster.
...