Hello, Gurus,
I want to know if it is possible to let compiler issue a warning/error for code as following:
Note:
1. Yea, it is bad programming style and we should avoid such cases - but we are dealing with legacy code and hope compiler can help identify such cases for us.)
2. I prefer a compiler option (VC++) to disable or enable ob...
i'm using windows xp what would be a good c compiler?
i want to learn c so that i can better understand the objective-c language for the iphone.
i have a great background in php so hopefully something will make sense
ps:
what sections should i put more focus on when learning c in getting prepared for objective-c?
thanks
Duplicate:
...
If you look at the source of Google pages with JavaScript, you'll find that the JavaScript is clearly not readable -- or maintainable. For example, all variables and functions are one-letter named (at least, the first 26 are...); there are no extraneous white-spaces or linebreaks; there are no comments; and so on.
The benefits of this c...
C++ templates have been a blessing in my everyday work because of its power. But one cannot ignore the (very very very very long) compilation time that results from the heavy use of templates (hello meta-programming and Boost libraries). I have read and tried quite a lot of possibilities to manually reorganize and modify template code to...
Is variable assignment expensive compared to a null check? For example, is it worth checking that foo is not null before assigning it null?
if (foo != null) {
foo = null;
}
Or is this worrying about nothing?
...
I am in a compilers class and we are tasked with creating our own language, from scratch. Currently our dilemma is whether to include a 'null' type or not. What purpose does null provide? Some of our team is arguing that it is not strictly necessary, while others are pro-null just for the extra flexibility it can provide.
Do you have an...
Hi,
Why compiling C++ in Mac always create *.dSYM directories?
Is there a way to disable that?
...
hello
Im wondering how pattern matching is usually implemented. for example in Erlang do you think its implemented at the byte-code level(there's a bytecode for it so that its done efficiently) or is it generated as a series of instructions(series of bytecodes) by the compiler?
it is such a useful thing that I just have to put it into a...
I know for CTP VS 2010 Images, but can I download only .NET Framework 4.0 and C# compiler?
...
I just ran into this while going through the Erlang compiler source.
I'm not really getting it. (go figure ;)), considering that I just realized that there is such a thing 5 minutes ago).
Forgive me for asking first without first trying to understand reasons for its existence.
There is a wikipedia article about it, but it is pret...
I'm working on a compiler for a stack machine (specifically CIL) and I've parsed the code into a graph of basic blocks. From here I'm looking to apply SSA to the methods, but it's not going too well. My first attempt (while working with a flat listing, rather than the graph) was to iterate over the code and keep a stack of SSA ids (tha...
We are always taught to make sure we use a break in switch statements to avoid fall-through.
The Java compiler warns about these situations to help us not make trivial (but drastic) errors.
I have, however, used case fall-through as a feature (we don't have to get into it here, but it provides a very elegant solution).
However the co...
How to compile simple C file using GNU C Compiler/gcc & Mobile-Terminal on the iPhone?!
Do I need extra files?
...
I have code like this, and I find it a bit hard to read:
// code1
if( (expensiveOperation1() && otherOperation() && foo())
|| (expensiveOperation2() && bar() && baz()) {
// do something
}
I just changed it to the following, to make it more readable:
// code2
const bool expr1 = expensiveOperation1() && otherOperation() && foo(...
I notice on the same machine, it takes C# much less time than C++ to compile. Why?
NOTE1: I have not done any scientific benchmark.
NOTE2: Before anyone says this isn't programming related, I am implementing a parser, I am finding what I can do from the get go to increase compile speed.
NOTE3: I have a similar question http://stackov...
I must produce a reconnaissor automat of SPDH protocol .
SPDH defines the structure of request and response messages exchanged between an electronic payment terminal and the server of the bank
The specifications of this protocol are described in this document :
http://www.trauco.com/docs/SPDH-specification_070212.pdf
I specified the f...
What is the difference between the JIT compiler and CLR? If you compile your code to il and CLR runs that code then what is the JIT doing? How has JIT compilation changed with the addition of generics to the CLR?
...
How would I print the date and time for the purposes of the build. Ie: When the console for my application starts up I want to do this:
Binary Build date: 03/03/2009 @ 10:00AM
I think this would be a super useful function for all applications to have behind the scenes for programmers, especially in a team environment.
Is there a si...
What's a common way of generating sentences from a grammar?
I want an algorithm that's sort of the opposite of a parser. That is, given a formal context-free grammar (say LL), I want to generate an arbitrary sentence that conforms to that grammar. I use sentence here to mean any valid body of text, so it can actually be a whole program ...
The hash_map and hash_set headers aren't included in the C++ standard yet, but they're available as extensions with all the compilers I've used lately.
I'm wondering how much I can rely on these in real code without sacrificing portability. I'm working on tools projects that need to run on a host of architectures and compilers, includi...