compiler

why it is up to the compiler to decide what value to assign when assigning an out-of-range value to a variable

in C++ Primer 4th edition 2.1.1, it says "when assigning an out-of-range value to a signed type, it is up to the compiler to decide what value to assign". I can't understand it. I mean, if you have code like "char 5 = 299", certainly the compiler will generate asm code like "mov BYTE PTR _sc$[ebp], 43"(VC) or "movb $43, -2(%ebp)"(gc...

every language eventually compiled into low-level computer language?

Isn't every language compiled into low-level computer language? If so, shouldn't all languages have the same performance? Just wondering... ...

assign operator to variable in python?

Usual method of applying mathematics to variables is a * b Is it able to calculate and manipulate two operands like this? a = input('enter a value') b = input('enter a value') op = raw_input('enter a operand') then how do i connect op and two variables a and b?? i know i can compare op to +, -, %, $ and then assign and compute......

Python Code Introspection and Analysis

Hi, I am trying to write a Python code analyzer, and I am trying to avoid having to parse bare Python text files. I was hoping that once the Python compiler/interpreter parses the code there's a way to get to the object code or parse tree from within a running Python program. Is there anyway to do this? Thank you ...

how/resources to compile a procedural language into [sql]

I am looking into the possibility/feasibility/resources for building a cross compiler which takes a procedural or Object Oriented language like C, or Java and compiling it into SQL. I understand that the advantage of SQL code is performing set operations which is fundamentally different from procedural languages which generally process 1...

How to manually throw a compiler error in GCC and Xcode

In xcode, while compiling apps with gcc, I want to throw compilation time errors if things like NSZombieEnabled is on for a distribution release, thus ensuring that compilation will fail and I won't accidentally do something stupid. I did some googling, but could not figure out how to cause the compiler to bail if a certain condition is...

How can a language's compiler be written in that language?

Possible Duplicates: implementing a compiler in itself Bootstrapping a language How can you write a compiler in the same language as the language you're writing that compiler for? Isn't that sort of recursive? Edit: This may be deleted, but otherwise... : How to bootstrap: http://stackoverflow.com/questions/193560/implem...

C++ WCHAR: Cannot allocate an array of constant size 0

I'm trying to create a WCHAR: LONG bufferSize = foo.bar() + 1; WCHAR wszBaz[bufferSize]; The compiler issues an error: error C2057: expected constant expression error C2466: cannot allocate an array of constant size 0 error C2133: 'wszBaz' unknown size What am I doing wrong? UPDATE: I added const but it still gives the same error:...

Implementation of ll(k) to ll(1) convertor !

is there any implementation of ll(k) to ll(1) convertor ? ...

Finding out which compiler Maven uses

Hi. Do you know how I can find out which of my JDKs Maven uses to compile my projects? ...

Maven default compiler compliance level

Hi. Do you know how I can find out the default compiler compliance level that my Maven installation uses when nothing is defined in the maven-compiler-plugin? Yours Bernhard ...

Do different JDK Updates produce different Java byte code?

A hypothetical scenario: I've got a project whose source compliance level is specified to 1.5. Now I compile this project with two different JDKs: At first with JDK 6 Update 7 and then with JDK 6 Update 20. Do these two different JDKs produce different Java byte code, although they only differ in their Update version? ...

Visual Studio: how does VS decide to build a release or debug exe

Hi, I just created a new project configuration. I named it 'Blah' So no 'debug' in it. Now how does Visual Studio know when to compile a debug file or a release file. is this merely defined by the DEBUG constant? Or am I wrong? :) Thanks I'm using C#, with Visual Studio 2008. Thank you for your answers. I read that I need to d...

how to use cpp source for 2 projects

I'm not sure if I am going about this the right way. I am making some c++ classes to use in 2 apps. I am going to have to compile them to be used in a Cocoa app and later be compiled for use with fastcgi. Should I create a dynamic library? ...

GWT 2.X No resource found for key

I've developed a GWT app using i18n internationalization. In Host/Dev mode it works fine, but launching GWT compile gives this error: No resource found for key xxx, like below. Compiling module ...rte.RTE Scanning for additional dependencies: file:/home/.../client/i18n/RTEValidationMessages.java Computing all possible rebind re...

Can I configure the compiler in Visual Studio to give warnings / errors for all non-localized strings?

I would like the compiler to detect all non-localized strings in my solution. This means any string in an .aspx or .cs file that doesn't come from a resource file. ...

How to access comments from the java compiler tree api generated ast ?

Hi, I've used the java compiler tree api to generate the ast for java source files. However, i'm unable to access th comments in the source files. So far, i've been unable to find a way to extract comments from source file .. is there a way using the compiler api or some other tool ? ...

What's the most popular compiler, and what's so bad about MSVS?

Hello, I've been using MS Visual Studio for a lot of projects, but I notice a lot of people here like to complain about Microsoft and Visual Studio. So I'm wondering, what does everyone use? Dev-C++? mingw? What is popular? Also, what is bad about MSVS? What is "better" about the others? Thanks! --RKL ...

error C2065: 'CComQIPtr' : undeclared identifier

I'm still feeling my way around C++, and am a complete ATL newbie, so I apologize if this is a basic question. I'm starting with an existing VC++ executable project that has functionality I'd like to expose as an ActiveX object (while sharing as much of the source as possible between the two projects). I've approached this by adding ...

JVM specification and Java compiler code useful for SCJP preparation ?

I'm preparing the SCJP exam with the almost official study book ("SCJP Sun Certified Programmer for Java 6 Exam 310-065") I understand that Java programming is writting code that fulfills a certain high-level contract; So that Java can stay platform-independent. However, I have trouble understanding and remembering things when it comes...