Questions tagged [compiler]

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

Filter by
Sorted by
Tagged with
2
votes
6answers
1k views

What should be done when upgrading compiler introduces bug in existing project?

We've 4 embedded firmware at hand. Two of them are released, are in maintenance phase. Other two are going to be released. The released product uses OKI 411 micro, where as yet to be released products ...
5
votes
1answer
3k views

Pros and cons of JIT and AOT [closed]

In which respects "Just In Time" compilation is better than "Ahead Of Time" compilation? And vice versa. Is AOT same as direct native compilation?
19
votes
8answers
2k 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 ...
17
votes
6answers
5k views

Do Fortran compilers really generate faster code than C compilers?

When I was studying in the university I often heard the idea that Fortran compilers produced faster code than C compilers for an equivalent program. The key reasoning went like this: a Fortran ...
3
votes
5answers
3k 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 ...
27
votes
5answers
12k views

Are C++ templates just a kind of glorified macros?

From different comparisons among C++ templates and C#/Java generics like this one- https://stackoverflow.com/questions/31693/what-are-the-differences-between-generics-in-c-and-java-and-templates-in-c/...
65
votes
19answers
10k views

How come compilers are so reliable?

We use compilers on a daily basis as if their correctness is a given, but compilers are programs too, and can potentially contain bugs. I always wondered about this infallible robustness. Have you ...
15
votes
13answers
2k views

Is it true that first versions of C compilers ran for dozens of minutes and required swapping floppy disks between stages?

Inspired by this question. I heard that some very very early versions of C compilers for personal computers (I guess it's around 1980) resided on two or three floppy disks and so in order to compile ...
16
votes
9answers
8k views

Career advice: PhD in theory of programming languages [closed]

I'm very interested in the theories of programming languages and going to apply a PhD in this topic, but I want to know more about the career after the graduate education. besides being a professor, ...
15
votes
4answers
7k views

Compiler Jobs - How Much Education Is Needed [closed]

I was motivated by the Compiler Construction As A Subject question and thought I would ask this one. I have heard from a few people that they have a good "compiler team" (don't ask where I heard it, ...
10
votes
6answers
6k views

What is the advantage of learning about and understanding compiler construction?

I'm a undergraduate in my 3rd year of a Software Engineering degree. From this year on, my university has introduced a new course called 'Compiler Constructions', which teaches you the basics of the ...
11
votes
2answers
2k views

How should compilers report errors and warnings?

I don't plan on writing a compiler in the near future; still, I'm quite interested with compiler technologies, and how this stuff could be made better. Starting with compiled languages, most ...
2
votes
1answer
544 views

How does compiler handle exceptions that are implicit? Looking for design strategies

Throughout the function handleException, the exception encountered is implicit. How does the compiler handle such implicit passing of exceptions? [For e.g. in C++ methods, this pointer is passed to ...
15
votes
12answers
5k views

Are there any compilers that attempt to fix syntax errors on their own? [closed]

I heard a while back that there used to be a compiler that attempted to fix syntax errors by analyzing context and inferring what was intended. Does such a compiler really exist? Obviously it has ...
33
votes
4answers
26k views

JIT compiler for C, C++, and the likes

Is there any just-in-time compiler out there for compiled languages, such as C and C++? (The first names that come to mind are Clang and LLVM! But I don't think they currently support it.) ...
80
votes
5answers
144k views

Is Python Interpreted or Compiled?

This is just a wondering I had while reading about interpreted and compiled languages. Ruby is no doubt an interpreted language since the source code is processed by an interpreter at the point of ...
27
votes
1answer
23k views

What are the main advantages and disadvantages of LL and LR parsing?

When building a parser to a programming language what I earn and what I lost choosing one or the other?
5
votes
5answers
3k views

How do I learn linking compiling, makefile quickly? Any book recommendations? [closed]

I'm very good at programming in C++ but when it gets to linking and the other important stuffs I feel very ignorant. I want to learn allegro without wasting time. So please suggest a book or a ...
82
votes
12answers
28k views

Should I use a parser generator or should I roll my own custom lexer and parser code?

What specific advantages and disadvantages of each way to working on a programming language grammar? Why/When should I roll my own? Why/When should I use a generator?
9
votes
3answers
2k views

Is Clang/LLVM ready for prime time? [closed]

Clang is able to be used instead of gcc? What your experience on that? What disadvantages there are yet? Performance of compilation is very better than gcc but about performance of code generated ...
15
votes
10answers
2k views

Compiler Warnings

Many compilers have warning messages to warn the programmers about potential runtime, logic and performance errors, most times, you quickly fix them, but what about unfixable warnings? How do you ...
4
votes
7answers
440 views

Not specifying a return in a function, good or bad?

I have coded like this many times, and I've never encountered an issue, but the compiler always warns when it expects a return and there is none. For instance, look at this: -(NSString *)...
5
votes
4answers
804 views

Programming as a conversation [closed]

I have often wondered if it would be possible to write a programming language that would work as a conversation. I would tell the computer that I want to store coordinates and it would ask what ...