Is there a difference if I compile the following program using c89 vs c99? I get the same output. Is there really a difference between the two?
#include <stdio.h>
int main ()
{
// Print string to screen.
printf ("Hello World\n");
}
gcc -o helloworld -std=c99 helloworld.c
vs
gcc -o helloworld -std=c89 hellowor...
Boost Network
I am trying out this code in a small console app on windows (VS2008) but cant compile it. Have linked to the boost.system library. Am i missing a header, #define or another library?
Headers
#include <boost/network/protocol/http/client.hpp>
#include <iostream>
Errors
using native typeof
1>c:\dev\3rdparty\boostproposed...
Do you know how strong VLIW architectures support exists in GCC compiler infrastructure? I know that there are some VLIW architectures supported by GCC. Looking at them, it seems that the pipeline optimizations are left to another optimization layer. Are there good (not GCC internals doc) materials on this?
...
Given following grammar
S -> L=L
s -> L
L -> *L
L -> id
What is the first and follow for the non-terminals?
If the grammar is changed into
S -> L=R
S -> R
L -> *R
L -> id
R -> L
What will be the first and follow ?
Thanks
...
I am having a core dump which stack is corrupted.
I try to disassemble it and found the following plz help me to anaylyse it ..
(gdb) bt
#0 0x55a63c98 in ?? ()
#1 0x00000000 in ?? ()
(gdb) disassemble 0x55a63c90 0x55a63ca8
Dump of assembler code from 0x55a63c90 to 0x55a63ca8:
0x55a63c90: add %cl,%dh
0x55a63c92: cmpsb %...
This
public class test
{
public static void main(String[] args)
{
Object o = null;
assert o != null;
if(o != null)
System.out.println("o != null");
}
}
prints out "o != null"; both 1.5_22 and 1.6_18. Compiler bug? Commenting out the assert fixes it. The byte code appears to jump directly...
This is a language design question:
Do you think unreachable code (in programming languages in general) should raise a warning (i.e. "report problem and compile anyway") or an error ("refuse to compile")?
Personally I strongly feel it should be an error: if the programmer writes a piece of code, it should always be with the intention o...
I have a 3rd party source code that I have to investigate. I want to see in what order the functions are called but I don't want to waste my time typing:
printf("Entered into %s", __FUNCTION__)
and
printf("Exited from %s", __FUNCTION__)
for each function, nor do I want to touch any source file.
Do you have any suggestions? Is ther...
In other words, what are the precise rules for how the Java compiler determines which overloaded method to choose to execute? I've spent a good amount of time googling and I think I'm not using the right search keywords.
public class C1 extends C2 {}
public class C2 extends C3 {}
public class C3 {}
public class Test {
public st...
i am really getting annoyed
all i want to do is setup a compiler for c in netbeans - i donwloaded and followed the instructions for MiniGW, and now whenever i try to comnpile a programme it says
""Resolve missing native build tools"
and the make command and debugger command fields are empty - can anyone help
if not can someone tell ...
I find the var keyword greatly helps in reducing noise in my C# code, with little loss of readability; I'd say that I now use explicit typing only when the compiler forces me to.
I know that using var does not change the runtime characteristics of my code. But the question has just occurred to me: am I paying a big penalty at compile ti...
I'm trying to build a C library with a non-native architecture. I'm running OSX 10.6 (which is x86_64) but I need the library compiled for i386. Normally, you can just add the compiler flag: -arch i386. But I'm using Autoconf and it ignores this in the configure file and it also ignores it if I try running: ./configure CC="gcc -arch i386...
When compiling a project in Visual Studio, the error message "the exec task needs a command to execute" appears, with no line number. What does this error mean?
(Apologies for asking and answering my own question; I just found an answer as I was writing this. Have made it community wiki, so as not to offend.)
...
I've got a largeish codebase that's been around for a while and I'm trying to tidy it up a bit by refactoring it. One thing I'd like to do is find all the headers where I could forward declare members, instead of including the entire header file.
This is a fairly labour intensive process and I'm looking for a tool that could help me fi...
What kind of advantages are there to changing 'cond' to be a special form instead of syntactic sugar?
...
Is there a standard way of dealing with the interaction between separate compilation and different kinds of closure conversion when compiling higher-order function calls?
I know of three function-like constructs that are distinctly compiled in most programming languages: closures, (top-level) functions, and C++-style function objects. S...
If established name doesn't exist, what name you can suggest?
...
I am a beginner in Compiler Engineering and I just want to know how to support IntelliSense.
...
According to the MSDN:
Because the Equals and GetHashCode
methods on anonymous types are defined
in terms of the Equals and GetHashcode
of the properties, two instances of
the same anonymous type are equal only
if all their properties are equal.
However, the following code demonstrates the compiler generated implementatio...
How come ceil() rounds up an even floating with no fractional parts?
When I try to do this:
double x = 2.22;
x *= 100; //which becomes 222.00...
printf("%lf", ceil(x)); //prints 223.00... (?)
But when I change the value of 2.22 to 2.21
x *= 100; //which becomes 221.00...
printf("%lf", ceil(x)); //prints 221.00... as expec...