compiler

gcc switches to enable analysis for warnings

In gcc, certain warnings require optimization to be enabled. For example: int foo() { int x; return x; } In order to detect the uninitialized variable, -O must be passed. $ gcc -W -Wall -c test.c $ gcc -W -Wall -c test.c -O test.c: In function ‘foo’: test.c:3: warning: ‘x’ is used uninitialized in this function However, thi...

Expressing Programming Language Semantics (AST -> ASG)

Do you have any pointers to information/research related to expressing computer language semantics in the same way, syntactical requirements are formalized using codified/markup notations (such as for example EBNF)? Thanks ...

Why python compile the source to bytecode before interpreting?

Why python compile the source to bytecode before interpreting? Why not interpret from the source directly? ...

"Deprecated" notation for Sun's C++ compiler?

Does the Sun compiler have a notation to mark functions as deprecated, like GCC's __attribute__ ((deprecated)) or MSVC's __declspec(deprecated)? ...

How is static variable initialization implemented by the compiler?

I'm curious about the underlying implementation of static variables within a function. If I declare a static variable of a fundamental type (char, int, double, etc.), and give it an initial value, I imagine that the compiler simply sets the value of that variable at the very beginning of the program before main() is called: void SomeFu...

What is the known limit for compiler performance on the current hardware?

Are there a real reason to use dynamic linking and binary distributions these days? For binary distributions there's an alternative in distributing everything in source code and letting the platform do the choice of compiling binaries or not. But whether it is usable or not depends about how well can today's computers compile from sourc...

compiling project with jdk1.5 using maven2

i managed to create my project structure using maven2. but when am compiling my project using mvn install getting error generics are not supported in -source 1.3 googled to build my project using jdk1.5 and added build tag <project> <modelVersion>4.0.0</modelVersion> <groupId>com.myProject</groupId> <artifactId>project</artifactI...

Why is the compiler package discontinued in Python 3?

I was just pleasantly surprised to came across the documentation of Python's compiler package, but noticed that it's gone in Python 3.0, without any clear replacement or explanation. I can't seem to find any discussion on python-dev about how this decision was made - does anyone have any insight inot this decision? ...

.tlh generated on 2 machines is different

I have a .NET dll which has some interfaces\classes which are exposed to com. during the build procedure a .tlb file is generated and this tlb is referenced by some c++ code. As a result the compiler generates a .tlh file for the tlb. When I run the build locally one of the properties in one of the interfaces ends up with a correspond...

adding manifest to jar file while compiling with maven2

Hi, I have made following changes to the POM.xml file for adding a manifest file that i have kept in \resources\META-INF But am unable to create an executable jar file. <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <con...

Java compiler warnings severity

Intro Some continuous-integration tools (say, Hudson) assume compilers generate warnings of different severity (aka priority): high, normal and low. Depending on number and severity of compiler warnings, the tool can mark a build as unstable. I want my builds unstable if compiler generates high priority warnings. I never seen any high (...

mod_wsgi 2.5 on Ubuntu 9.04 with Python 2.6.2 installation.

Has anybody succeeded with mod_wsgi 2.5 on Ubuntu 9.04 with default Python installation (2.6.2)? I got compilation errors: mod_wsgi.c:119:2: error: #error Sorry, mod_wsgi requires at least Python 2.3.0. mod_wsgi.c:123:2: error: #error Sorry, mod_wsgi requires that Python supporting thread. which Python gives /usr/bin/python and /usr/...

How can I remove the VS warning C4091: 'typedef ' : ignored on left of 'SPREADSHEET' when no variable is declared

This warning is triggered multiple times in my code by the same declaration, which reads : // Spreadsheet structure typedef struct SPREADSHEET { int ID; // ID of the spreadsheet UINT nLines; // Number of lines void CopyFrom(const SPREADSHEET* src) { ID = src->ID; ...

Are there Lisp native code compilers?

Are there native code compilers for Lisp? To which extent can it even be compiled, with all it's dynamic nature, garbage collection, macros and what else? ...

How to Represent Classes in an Abstract Syntax Tree Based Interpreter

I have read the related questions, but none of them appears to address the question directly. I am working on writing a PHP script interpreter. I have the AST generating proper nodes for everything except classes. Handling classes is a bit different than handling functions, so I am looking for how to handle classes that are standalone...

Visual Studio thinks my controls are missing, but they're not. "The name xx does not exist in the current context"

When working with an ASP.NET application in Visual Studio 2008, my errors window often contains a list of errors such as; The name 'txtUsername' does not exists in the current context. When I double click on the error, it will go to the source, show the control underlined in red, then realise it's mistake and remove those errors. It'...

In terms of programming, what do semantics mean?

This is a sentence from Eric Lippert's blog: Given that unfortunate situation, it makes sense to emphasize the storage mechanism first, and then the semantics second. It's easy to get a dictionary definition of what "semantic" means but what does it mean in terms of computer jargon? ...

Design strategy for a simple code parser

I'm attempting to write an application to extract properties and code from proprietary IDE design files. The file format looks something like this: HEADING { SUBHEADING1 { PropName1 = PropVal1; PropName2 = PropVal2; } SUBHEADING2 { { 1 ; PropVal1 ; PropValue2 } { 2 ; PropVal1 ; PropValue2 ; OnEvent1=BEGIN ...

Comparing Integer and Integer? results in Boolean? not Boolean

I'm just writing a bit of code to compare an id of integer with an id of integer? for example: Dim id As Integer = 1 Dim nullId As Integer? = Nothing Dim areEqual As Boolean areEqual = nullId = id When I try to compile the code I get a compiler error: Option Strict On disallows implicit conversions from 'Boolean?' to 'Boolean'. Whi...

Delphi: How to organize source code to increase compiler performance?

I'm working on a large delphi 6 project with quite a lot of dependancies. It takes several minutes to compile the whole project. The recompilation after a few changes is sometimes much more longer so that it is quicker to terminate Delphi, erase all dcu files and recompile everything. Does anyone know a way to identify, what makes the c...