compiler

Any Online compiler you know for C or other languages?

Any online C compiler that you know which can do the following: Compile and execute the C programs online File handling System functions like exec(), system(), fork() Or any compiler which does not need installation procedure (I mean that you can just copy paste a folder to run the compiler easily) Note:Please do not propose Turbo C...

Netbeans - Executing files in different projects with [SHIFT]+[F6]

In Netbeans you can run a file by pressing Shift+F6 (on Windows) So I have three projects open at the moment. What I want to do is jump between the three projects and compare the results of executing a program in each of these three panes. Netbeans seems to have a problem with this. It doesn't seem to be able to recognize that I want ...

What would your own programming language look like?

What would your own (I assume perfect) programming language look like? Give a small example and explain your novel ideas! I'm really interested in the syntax. ...

How do I unroll (compile) an interpreter loop?

I heard that some languages go from interpreted to compiled by "unrolling the interpreter loop". Let's say I have the following pseudo-c-code interpreter for an ast tree. int interpret(node) { switch(node) { case PLUS: return interpret(child(0))+interpret(child(1)); case MINUS: return inter...

Why doesn't C# offer constness akin to C++?

References in C# are quite similar to those on C++, except that they are garbage collected. Why is it then so difficult for the C# compiler to support the following: Members functions marked const. References to data types (other than string) marked const, through which only const member functions can be called ? I believe it would...

Switching 3rd party compilers in devenv from the command line

We have an automated build system, which builds a variety of Visual Studio 2005 solution files. These solutions contain various Visual C++ and Intel Fortran projects. We are in the process of upgrading our Intel Fortran compiler, and Visual Studio is currently setup to be integrated with the old Intel compiler (ver 9.1). I'm looking fo...

Strange assembly from array 0-initialization

Inspired by the question Difference in initalizing and zeroing an array in c/c++ ?, I decided to actually examine the assembly of, in my case, an optimized release build for Windows Mobile Professional (ARM processor, from the Microsoft Optimizing Compiler). What I found was somewhat surprising, and I wonder if someone can shed some ligh...

erlang type system

hello I've been scrounging around the web looking for various typing practices of Erlang programs and there seem to be a few... although its somewhat difficult to find a solid source of info namely Im looking for practical info about: 1."-specs" - this one looks pretty attractive. a few places mention that the functions that have an ass...

Understanding C++ compilers from a Java / C# perspective

I'm a moderately experienced Java / C# programmer, and I've recently started learning C++. The problem is, I'm having trouble understanding how to structure the various header and code files. This seems mostly due to my lack of understanding as to how the compiler links everything together. I've tried reading some textbooks, but my preco...

Take string "asdxyz\n" and replace \n with the ascii value

I dont want to replace it with /u000A, do NOT want it to look like "asdxyz/u000A" I want to replace it with the actual newline CHARACTER. ...

what is the best free windows c++ IDE/compiler

What is the best free windows c++ compiler, ideally cross-platform. I've tried Bloodshed, Ganymede, EasyEclipse, Visual C++ express. Visual C++ express is the only one I've been able to get the debugger working on! ...

Cannot refer to the static enum field within an initializer ?

I just got Java5 project that has this error, i tried using Java5 and Java6, but its still there. it worked somehow before(since it was in svn), how can i bypass that compiler error? ...

JIT compiler vs offline compilers

Are there scenarios where JIT compiler is faster than other compilers like C++? Do you think in the future JIT compiler will just see minor optimizations, features but follow a similar performance, or will there be breakthroughs that will make it infinitely superior to other compilers? It looks like the multi core paradigm has some pro...

C++ cwchar error

Hi, I am trying to compile the regex_search function on the vxWorks gcc platform. I was testing with an example to see if I can use it without any issues. The example file includes the following three headers. #include <string> #include <map> #include <boost/regex.hpp> The errors I get are as follows include/c++/3.4.4/cwchar:73: er...

Equivalent of Make on Windows?

I develop on Windows, and I'd like to use beanstalkd. It's only available as a tarball, and I was just wondering if there is some way to easily build it like you can in Linux? I found some ports of gnu make for Windows, but they don't seem to be working. Are the source distributions somehow specific to Linux? Edit: When I try to use min...

Reference code containing every single possible construct in C

Hi all, Chapter 6 Language of the C Standard defines all the different concepts, conversions, lexical elements, expressions, declarations, statements, blocks, external definitions and so on which are defined in the C standard. I was wondering if there is a reference body of code anywhere which contains all these elements of the C langu...

I need a simple way to compile C++ code on a Mac intel, for the purpose of learning C++. I

I have a text book already and need a painless!! way to write and test the code ...

Broken Mono C# code using System.Windows.Forms

A couple of months back I started a relatively simple C# app which I was compiling with Mono. I try to resume work on this today, and despite having an executable proving it compiled fine before, it is now complaining about System.Windows.Forms C:\Program Files\Mono-2.0.1\bin>mcs ../projects/test_1/test.cs ../projects/test_1/tes...

Compiling UTF-8 encoded source with Unicode line separators

Using the latest version of the Microsoft Compiler (included with the Win7 SDK), I'm attempting to compile a source file that's encoded using UTF-8 with unicode line separators. Unfortunately, the code will not compile -- even if I include the UTF-8 signature at the start of the file. For example, if I try to compile this: #include <s...

Why isn't pass struct by reference a common optimization?

Up until today, I had always thought that decent compilers automatically convert struct pass-by-value to pass-by-reference if the struct is large enough that the latter would be faster. To the best of my knowledge, this seems like a no-brainer optimization. However, to satisfy my curiosity as to whether this actually happens, I created...