A compiler is a computer program that transforms source code written in one programming language into another computer language.

learn more… | top users | synonyms

5
votes
3answers
415 views

Should a standard include header be specified in each file or as a compiler parameter?

I've got a file such as this: #ifndef STDINCLUDE #define STDINCLUDE #include <memory> #include <stdexcept> #endif I want this file to be included in every header file, because I use ...
3
votes
1answer
2k views

What would be the best way to learn about compilers, and executable formats? [duplicate]

I want to write my own compiler for my own language. Yes, it's going to be hard, and it will take long, but I think it will be worth it. I have looked into OSDev.org, and read about executable ...
1
vote
2answers
87 views

Methods on packaging an assembler with compiler

I am planning on creating a compiler that will generate assembly, that is as far as I really want to go with this project (don't want to create the object files myself or any of the machine code). ...
11
votes
3answers
537 views

How is type checked in a dynamic language interpreter/compiler, such as JavaScript?

In dynamic languages, such as JavaScript or Python, the type of a variable is determined at runtime. This is one reason why they are slower than typed languages such as Java. How is type checking ...
2
votes
4answers
381 views

What programs emit C++ code and pass it to mainstream compilers?

I suspect there're programs that instead of emitting machine code instead emit C++ code and then start a mainstream C++ compiler to compile it to machine code. I can't find any notable examples ...
8
votes
9answers
1k views

How do I know if the compiler broke my code and what do I do if it was the compiler?

Once in a while C++ code will not work when compiled with some level of optimization. It may be compiler doing optimization that breaks the code or it may be code containing undefined behavior which ...
2
votes
5answers
240 views

Where could SPMD parallel programming be used in a Compiler?

I have little knowledge about the subjects of compiler construction and parallel programming, so please bear with me. This is a course about compiler construction, and we are asked to learn CUDA while ...
6
votes
2answers
388 views

Idea for a domain specific language or DLR port?

I have my undergraduate final year project coming up and am very interested in lexers, parsers, compilers and so on. I would like to use the DLR (.NET 4.0 dynamic language runtime) for my ...
24
votes
0answers
2k views

What are the advantages of the Intel C++ compiler? [duplicate]

What are the advantages over the Intel C++ Compiler over the (much cheaper) free alternatives, such as gcc?
11
votes
2answers
514 views

How easy should a language development framework be to use?

This is part of a series of questions which focuses on a project called the Abstraction Project, which aims to abstract the concepts used in language design in the form of a framework. Another ...
1
vote
10answers
540 views

Compiler time versus programmer time [closed]

I want to briefly discuss managed or interpreted languages. It's said that they're worth developing in, because the CPU time is worth less than the programmer time required to develop in a faster ...
5
votes
7answers
409 views

Does the source language matter for your first (few) compilers?

I've been very interested in writing compilers but have been scared off by the complexity of it. I've finally took the plunge and started writing my first compiler and the language I picked is ...
9
votes
4answers
582 views

General rules for writing a X compiler to Z in Y

Suppose X is the input language, Z is the output language, then f is the compiler, which is written in language Y. f = X -> Z Since f is only a program, I think Y can be any language, right? So ...
16
votes
5answers
6k views

What is the history of the C compiler?

When we say that "Dennis Ritchie developed C language", do we mean that he has created a compiler (using an 'already' developed other language) which can compile the source code written in C language? ...
1
vote
2answers
130 views

Cross-library and cross-programming-environment support

Often people talk about cross-platform compatibility, but is it possible to write such "universal code" that would work both in browser, in desktop, on opengl, on webgl, and on html5 canvas-object? ...
6
votes
2answers
1k views

Why isn't anyone talking about parallel compilation for .Net?

Builds are slow and take time. We can get MSBuild to parallelize them, but only on a single machine, not across a cluster. Why hasn't anyone come up with clustered build solutions in the .Net space? I ...
11
votes
7answers
778 views

Do you read C or C++ compile errors after the first one?

I never understood why C and C++ compilers try to recover from errors and continue parsing. Almost always, the first error generates a stream of bogus errors that will disappear as soon as the first ...
4
votes
5answers
1k views

Learning to implement dynamically typed language compiler [closed]

I'm interested in learning how to create a compiler for a dynamically typed language. Most compiler books, college courses and articles/tutorials I've come across are specifically for statically typed ...
18
votes
6answers
1k views

Aren't there compilers better at telling the programmer what's wrong in a code?

I have worked a little while with the Microsoft compiler from Visual C++ but I worked a long time with G++, and I remember often having bad times understanding what was wrong in my code with the ...