compiler

gcc and g++ not provided by the webhosing machine

All, In a webserver if gcc and g++ are not provided by the hosting service to the user.Can we download it and compile through it in RHEL5 OS. If so please provide the suitable link to download it. Thanks...... ...

Explain piece of C# code and conversion to VB.NET

Yesterday I asked this question. Rubens Farias answered it by pointing to this piece of code he wrote. The following part of it cannot be compiled by MS Visual Studio 2010 Professional Beta 2. byte[] buffer = Encoding.UTF8.GetBytes( String.Join("&", Array.ConvertAll<KeyValuePair<string, string>, string>( inputs...

General purpose utility or library for compiling/decompiling binary data files ?

I have various binary file formats which I need to dump to some kind of text format, edit and then recompile (possibly to a slightly different version of the binary format). Of course I could write a bunch of utility code in C/C++ to do this kind of thing, and maybe leverage a library for the text side of things (XML or JSON or whatever)...

Cygwin compiling error: "this application has requested the runtime to terminate it in an unusual way"

I am trying to run Cygwin, and I am running into some problems. I tried to compile a program that works both on Windows with mingw and on a Unix system, but when I go to compile it through Cygwin: gcc threads.c -o threads I get the error: this application has requested the runtime to terminate it in an unusual way And that's it... a...

What do you think about interpreter of usually compiled languages?

I worked with a C++ interpreter (CINT) and my experience was disastrous. It's full of bugs, strage behaviours, not standards... and I'm arrived to a conclusion: it's wrong to create an interpreter of a language born to be compiled because I think that the design of a language is strictly bounded to the fact that it will be interpreted or...

How is compare different from compareTo in this Scala code?

I have a piece of code that I use to provide an implicit ordering for a priority queue: type Time = Int type Item = (Time, Whatever) implicit def order(thisItem: Item): Ordered[Item] = new Ordered[Item] { override def compare(thatItem: Item) = { val result = thisItem._1 compareTo thatItem._1 -result } ...

Two '==' equality operators in same 'if' condition are not working as intended.

I am trying to establish equality of three equal variables, but the following code is not printing the obvious true answer which it should print. Can someone explain, how the compiler is parsing the given if condition internally? #include<stdio.h> int main() { int i = 123, j = 123, k = 123; if ( i == j == k) ...

Memory leaks in Debug mode

Is there any reason for a program to leak when compiled in Debug mode and not in release? (Debug means debug informations, and compiler optimization disabled, Release means no debug info / full optimization) That's what it seems to do but I can't figure out why. Btw purify is not being helpful here ...

I need a tree dump option, which doesn't exist any more in current gcc versions

Older versions of gcc (for example 4.0.2 or 4.1.2) had the option -df (see http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Debugging-Options.html#index-fdump_002drtl_002dcfg-357). I used this option to dump the files filename.c.134r.life2 and filename.c.126r.life1, because I want to extract some values out of these files (for example the reg...

Is the C# compiler smart enough to optimize this code?

Please ignore code readability in this question. In terms of performance, should the following code be written like this: int maxResults = criteria.MaxResults; if (maxResults > 0) { while (accounts.Count > maxResults) accounts.RemoveAt(maxResults); } or like this: if (criteria.MaxResults > 0) { while (accounts.Count ...

gcc with parameters "-S -save-temps" puts intermediate files in current directory

The parameters -S -save-temps work fine, as long as i don't use them on files with the same name. Think of the following situation: I have a project with a main directory and a subdirectory with the name subDir and in both of the directories are files placed with the name file.c. If I now call gcc -S -save-temps file.cpp subDir/file.c o...

C# 4.0: Can I use a TimeSpan as an optional parameter with a default value?

Both of these generate an error saying they must be a compile-time constant: void Foo(TimeSpan span = TimeSpan.FromSeconds(2.0)) void Foo(TimeSpan span = new TimeSpan(2000)) First of all, can someone explain why these values can't be determined at compile time? And is there a way to specify a default value for an optional TimeSpan obj...

Why Does Test Condition of "for(;;)" Succeed?

Insomuch as I understand "for(;;)" has no initial condition, no test condition and no increment condition, and therefore loops forever, I am curious why the test condition succeeds each loop. Does the empty expression ";" evaluate as true in C? Or is this a special case handled by compilers? A similar, but unrelated question. ...

QMetaObject Compiler explain?

I am trying to know how Qt implements meta object compiling which enables them to provide signal slot mechanism in Qt. I am not able to finding much details in the documentation. EDIT::I am not able to get the source code of _id = QObject::qt_metacall(_c, _id, _a); Following is source file and corresponding moc file. #ifndef SSOBJECT...

I never really understood: what is Application Binary Interface (ABI)?

I never clearly understood what is an ABI. I'm sorry for such a lengthy question. I just want to clearly understand things. Please don't point me to wiki article, If could understand it, I wouldn't be here posting such a lengthy post. This is my mindset about different interfaces: TV remote is an interface between user and TV. It is an...

how to add my compiler to eclipse ?

i have a mini compiler written using flex and bison using c++ and i want to use it in eclipse as using java compiler , but i dont know any thing how to do that , so i want some help and some advices and if there is another method please point to it . thanks ...

How to tell if you're compiling on windows?

like is there a: #ifdef WINDOWS // do stuff #else // linux stuff #endif ?? ...

Is C# used anywhere besides .NET programming?

It's my understanding that C#, though created by Microsoft, is a programming language that can be used or implemented for things other than .NET programming. For example, I could create a compiler for C# to target native x86 or other processors or even a JVM. Is my understanding incorrect? Does anyone know if C# is used for anything besi...

what is the difference between small memory model and large memory model ?

what difference does it make when i choose 'large memory model' instead of 'small memory model' inside Turbo C compiler ? how does that change behavior of my program ? regards, essbeev. ...

Questions about advanced compiler settings in visual studio Express 2008 express edition

All the information I've found regarding compiler settings is with regards to the full version of VS, which seems to be at odds with the express edition. The first point is, there is no option on the screen to say if I'm setting options for debug or release mode. Now to the questions: (1) The enable optimizations option is checked. Is ...