compiler

Compile error for the Hello pass example of llvm

Hello all, I was trying the Hello pass example in the "Writing an LLVM Pass" webpage ( http://llvm.org/docs/WritingAnLLVMPass.html#basiccode ). I followed the instructions to compile (with gcc-4.2) the Hello.cpp, but I got the compile errors: Hello.cpp:20: error: expected identifier before string constant Hello.cpp:20: error: expect...

Is there a way to debug with the visual studio command prompt?

I've got a project that I need to get working with 3 compilers (borland, gnu, and microsoft). It works on 2/3 and now I just need to get it working with microsofts. It seems to crash in places that it works fine with the other compilers, so I'm wondering if there is a way to debug with the command line, maybe to get a stack trace or ge...

Recompiling with mxmlc

Hi. I'm having some trouble with the mxmlc compiler. It doesn't catch my changes in the code. It's like it uses some old cache. I can for instance change the structure of a method, build and the see the compiler say "Successful build" even thou it's obvious that some lines will fail! I have looked at the args list for mxmlc but nothi...

Grammar vs. Semantic analysis

I am wondering where is the borderline between grammar specification and semantic analysis. What is better: to use a detailed grammar description or leave the details for semantic phase? For example: imagine an OO-language like C# with enum type, that can "derive" from a primitive type enum X : int { a = 1 } Now, should the correctnes...

What to do when waiting for an application to compile?

I find that local builds will some times take 5-10 minutes of an application we are working on, but I always feel a little icky about going on line during that time... kind of like now ;). What do you guys do when waiting for your application to compile? ...

__decorated__ for python decorators

As of 2.4 (2.6 for classes), python allows you to decorate a function with another function: def d(func): return func @d def test(first): pass It's a convenient syntactic sugar. You can do all sorts of neat stuff with decorators without making a mess. However, if you want to find out the original function that got decorated you hav...

Infix vs Postfix

Had this question in the interview yesterday. Which is better to use? Infix(with parenthesis) or Postfix? State with reason.. I only could tell them that: it is easier for the compilers to process postfix expression for arithmetic evaluations and operator precedence. More memory is used for storing and processing the parenthesis. ...

C# compiler flaw?: Not detecting methods that always throw exceptions

Why does the MS C# compiler complain that "not all code paths return a value" in the following scenario? public int Foo(bool flag) { if(flag) { return 1; } else { ThrowException(); // this method always throws an exception // return -1; // why do I need to add this code that will never be cal...

Are comments removed by the compiler of Objective C iPhone apps?

I just wondered if comments are included in binaries, or does the compiler know to remove them? ...

Why no c# native compiler project on win32?

Hi, Nowadays open source projects are almost everywhere, especially for compilers, c++ compilers, pascal compilers, even for d language, go language, but why there is not a c# compiler, which works on native windows? Is there any legal restrictions, or any technical barrier? or no market requirement? I was wondering on this question fo...

Eclipse custom java complier

Hi, I am using eclipse to create my jsf project. I created my own components, and I don't want the other programmers to be able to use jsf regular components like h:inputtext etc. How can I do it in eclipse, that if the user adds specific tags like h:inputtext he will see errors in the page and also when trying to run it? ...

Compile C program in Linux with different glibc library

Hi, I have a firewall appliance base on linux that have glibc-2.3.4, and have not gcc to compile a program for that. when I compile a program by another linux machine, error message says: require glibc.x.x.x how can I compile a c program in another linux machine for that version of glibc? ...

General compiler command-line syntax : where to find a reference

As far as I can see, most C and C++ compilers - be it GNU Compiler Collection, be Intel, among others - share a very similar command-line syntax. But I have not found a general reference what this de-facto standard constitutes, not to speak of any subtle differences between different vendors. Hence I would like to see such a general ref...

Do I need to pay to create interactive flash movies?

I want to create interactive movies using flash technologies. Do I need to buy a program from adobe to be able to create my flash movies or there are some free software that I can use? I would prefer something for Linux (Ubuntu). ADDED I need to program in "actionscript" and I would like to know what programs can I use to compile my co...

Another question about C compiler asm output

Hi, very quick question for you. When I store some automatic variable in C, asm output is like this: MOV ESP+4,#25h , and I just want to know why can´t compiler calculate that ESP+4 adress itself. I thought this through, and I really cant find reason for this. I mean, isnt compiler aware of the esp value? It should be. And when using a...

Do JavaScript compilers have its preference over how indentation, spaces, and curly braces are placed in the source code?

Hi all. I'm currently having my peer code review with my colleague and have had this question on the subject. Is there any preferable syntax for coding, say, if clause statement for JavaScript compilers(JavaScript Engines)? I personally prefer the pattern A when I review the code myself, but do the compilers have their preference too? ...

Javac can't find .class files, have right classpath

Although I'm not new to programming in general, I am new to java, and it seems to work a little bit differently. When trying to compile a .java with javac it gives me this error: cannot find symbol. I looked the cause of this up, and the error occurs when the .class file that you are referencing could not be found. I ensured that all of ...

A windows php stand-alone compiler that works with the Zend GData library and PHP 5.2x ?

Hi all, I am hoping there exists a: " php stand-alone compiler that works with the Zend GData library and PHP 5.2x." For using with the following php GCAL sync software for a software called todolist. Any suggestions? ...

Resource Compiler question (initially posed as "UAC together with Subst don't work well together")

I am trying to run VS2010 with UAC on. ResourceCompiler complains that it cannot find a file located on a subst'ed drive. Here's a fusion log. *** Assembly Binder Log Entry (8/16/2010 @ 1:54:39 PM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Wind...

Lisp compiler design

I am looking for a compiler design book. I am learning it at college; but lectures were never meant for me. Moreover, at my college they don't do much practical and I believe even if I sincerely do the course about finite automata and compiler design, I will not know how to implement a compiler. So, I am looking for books about implement...