A compiler is a program which translates one language into another. The tag [compiler] should be applied to questions concerning the programming of compilers or for questions about the detailed inner workings of compilers. Don't use [compiler] for questions about options and settings for a ...

learn more… | top users | synonyms (2)

0
votes
0answers
5 views

Windows SDK 7.1 CMD - “Compare cannot be used here syntactically” (setenv)

I am trying to compile PHP on a Windows 7x64 machine. Windows SDK 7.1 is installed, and the first step in this tutorial is to run setenv /x86 /xp /release. But doing so results in the following error ...
0
votes
1answer
15 views

Qt Creator 2.7.0 compiler error

Screen-shot from Tools > Options > Build & Run > Compilers Screen-shot from Tools > Options > Build & Run > Qt versions Screen-shot from Tools > Options > Build & Run > Kits ...
3
votes
3answers
102 views

Compiler code generation comparisons

Ok, so all started here: Unsigned integer and unsigned char holding same value yet behaving differently why? I wrote the following application to understand what happens behind the scenes (ie, how ...
1
vote
1answer
13 views

Interpreting/Designing an AST or using an IR

I am currently implementing my own simple toy programming language. I would like this to be implemented as quickly as possible, but I am quite unsure where to go from the current stage I am in. I plan ...
-2
votes
3answers
81 views

Lightweight C but NO C++ compiler [closed]

I'm helping out my friend with a project and I'm decent C++ programmer, but they need program done in C. As far as I saw, when you open project in Visual Studio/Netbeans it says C/C++. C++ part is bad ...
-2
votes
1answer
32 views

Setting up cross compiler for Raspberry Pi on Ubuntu 13.04 [closed]

I am currently trying to set up a cross compiler for Raspberry Pi (Using Ubuntu 13.04), and I am running into an error that I cannot interptet (or find any help with on google). I have been following ...
0
votes
0answers
19 views

Compiling Qt with a struct member alignment of 1 in Visual Studio

The Issue I have a Qt application that is made in Visual Studio 2005 which uses a fair amount of other libraries which are all compiled with a struct member alignment of 1. I'm also pretty sure that ...
-4
votes
0answers
49 views

Getting a C++ Source Code to Work [closed]

I'm trying to build a simple syntax analyzer - compiler project, I searched the internet extensively on how to write one. I understand the whole theory but I can't get it on code. Finally I found this ...
16
votes
1answer
394 views

Strange C Programming Language Grammar [duplicate]

recently I ran into a strange grammar of C Programming Language. First, let's see the code: main(void) { int a[10:> ; printf("asdf"); return 0; } And you can compile it with gcc: /tmp gcc ...
1
vote
2answers
61 views

C++ struct redefinition compiler error

I have created a new .h file with the following contents: #include "stdafx.h" #include <string> using namespace std; struct udtCharVec { wstring GraphemeM3; wstring GraphemeM2; }; ...
0
votes
2answers
43 views

effect of position of fileds in a class?

Is there any difference in the code generated for the following classes in java: class A_noConstructor { public static int par1; public static int par2; void method1(){ } void ...
1
vote
1answer
57 views

Compiling C++ source for maximum portability

I created a standalone executable using C++ and I want it to be usable by the largest number of people possible. In terms of compiler options what can I do to ensure this? I'm using MinGW with the ...
0
votes
0answers
12 views

Type checking rules for array

I need guide to know about the type checking rules for array allocation, array length and lookup in an array in the semantic analysis phase of implementing compiler for miniJava. Any help would be ...
1
vote
0answers
33 views

CoffeeScript loose compilation

Is there a way to compile CoffeeScript source loosely ignoring minor syntax errors like: variable = or object.? Is it possible out-of-the-box with stock compiler or some other compiler implementation? ...
2
votes
2answers
80 views

Does compilers move skip checks to outside the function call?

Functions or methods like: void DoSomething(...){ if( ... ) return; ... } Checks that skip the entire function if a condition is met. Does the compiler move the check code outside the ...
-1
votes
2answers
29 views

How to write a custom assembly compiler (sort of) in VB.NET

I've been trying to write a simple script compiler for a custom language used by the Game Boy Advance's Z80 processor. All I want it to do is look at a human-readable command, take it and its ...
-2
votes
2answers
39 views

How can I implement an expressions structure in java that supports evaluating and multiple types

In the light of writing a tool that compiles simple programs in a custom language that uses a parser for parsing simple .txt-file programs, I'm looking for an efficient way to store and evaluate ...
1
vote
4answers
34 views

How to tell distutils to use gcc?

I want to wrap a test project containing C++ and OpenMP code with Cython, and build it with distutils via a setup.py file. The content of my file looks like this: from distutils.core import setup ...
4
votes
1answer
95 views

strange behavior in for loop - a bug?

I'm working with Visual Studio 2012 on a Windows 7 machine and when trying to run the following code snippet (compiled with the default VC11 C++ compiler in x64 mode) the assertion fails, which means, ...
0
votes
1answer
21 views

'env: ruby_noexec_wrapper: No such file or directory' error in PhpStorm SASS compilation on Mac

I read around a lot and tried different things but my PhpStorm just doesn't want to compile my SASS/SCSS files into CSS files. Here are pictures of my File Watcher configuration and the error message ...
1
vote
1answer
101 views

Are std::functions inlined by the C++11 compiler?

I'm working on a small mathematical optimization framework in C++11, and I wonder what's the best way for the user to provide domain-specific logic. I could force her to define classes with hook ...
0
votes
0answers
30 views

VS tries to compile Resharpers decompiled code

Sometimes when I have looked at decompiled code using Resharper's decompiler and then try to build my project, VS tries to compile the decompiled code that Resharper generated for me. When I look at ...
5
votes
1answer
112 views

Lambda returning lambda incorrectly infers return type?

This question is a continuation of a recent question of mine: What is this compiler error when using a lambda as a template parameter? This code fails to compile using the VS2012 (Update 2): int ...
3
votes
1answer
72 views

Why is dynamic binary translation more practical than static binary translation?

When it comes to Binary Translation (Recompilation), I have always heard that dynamic binary translation is often a much better alternative to static binary translation, but I can't ever seem to grasp ...
0
votes
1answer
25 views

Where to find formal grammar for Ruby on Rails, Cobal, and VSL?

Does anyone know where I can get the formal grammar for these languages especially Ruby on Rails? I'm interested in looking at how the language is processed. Thanks
0
votes
1answer
32 views

Scala Compiler doesn't compile in ScalaIDE

I'm trying to develop on the Scala compiler project with the help of ScalaIDE. I followed this guide to set up the development environment. When I now try to build the mentioned projects, the reflect ...
1
vote
1answer
29 views

Debugger shows invalid instruction

Sometimes it happens, that Visual Studio debugger shows invalid current instruction. The simplest possible reasons are: Outdated .pdb files. These files contain information about which offset of the ...
-3
votes
0answers
9 views

error C2039: 'yyvsp' : is not a member of 'YYSTYP'

I'm writing a compiler to pascal (in C++) this is a part from my syntactical.y %{ #include <stdio.h> #include "AST.h" #define YYDEBUG 1 extern int yylex(); extern int yylineno; extern int col; ...
0
votes
1answer
95 views

How to make a functional language compiler

I am looking into writing a language and a compiler for it as a summer project, and am having a hard time finding information on how to use a parse tree or BNF/EBNF to program a compier. The overall ...
1
vote
1answer
61 views
+250

Dependencies for jdt.compiler cannot be found

The issue is that it seems impossible to run ASTView from source; I get a NullPointerException, something to do with singletons I think. The solution - or so I thought - was to start a new plugin ...
0
votes
2answers
57 views

Say I didn't like the syntax of objC blocks… (or: how to customize llvm a little bit)

...is there anything I could do about it? To be more precise, I would like to replace the caret "^" with something like "§" - granted, there's not much left on the keyboard that's not in use already. ...
-1
votes
1answer
53 views

Linking prebuilt object in Arduino IDE [closed]

I am trying to compile an arduino program. I want to have some files already compiled, everything except sketch. I already modified arduino IDE for compiling just uncompiled files but I need to have ...
0
votes
2answers
56 views

Should casting from ``real`` to ``double precision`` in FORTRAN be affected by the compiler?

I have a FORTRAN code that I need to run on a server. I noticed that the results are a little different between the two machines. Looking into it, I learned that the difference rise from a function ...
1
vote
1answer
42 views

How to make closure compiler to remove all dead code with advanced optimization in larger projects?

The following code: function f(a) { a.a = 5; return a; } f(function() {}); f(function() {}); f(function() {}); f(function() {}); f(function() {}); f(function() {}); f(function() {}); f(function() ...
0
votes
0answers
27 views

There is nothing innately slow about GolfScript. (…) Analysis could be done to remove most if not all stack use. Explain?

From http://www.golfscript.com/golfscript/syntax.html , Ruby is slow to start with so GolfScript is even slower. There is nothing innately slow about GolfScript. Except for the string evaluate ...
1
vote
0answers
35 views

Build a .lib with the Intel C++ compiler and use with app in VC++?

I'm using VC++ 2012 to compile a solution with 2 projects. The main library is a Class Library project which simply outputs a .lib file, and the second is an Application, which uses the compiled ...
4
votes
2answers
84 views

How does object oriented code translate into machine code?

How exactly does the oop code that I write in C++ or C# for example translate into machine code or in the case of C# into bytecode? I mean, how do the objects translate? In procedural programming ...
1
vote
1answer
42 views

Generating big files in .NET

I would like to ask on two things about .NET executables: .NET executable is in PE format. Does it mean that address generated by CIL compiler is from the beginning of the file ...
0
votes
1answer
23 views

Are there any classes which can supply you with what a MethodInfo/method name would be?

I was wondering if there are any classes which can generate a MethodBase/MethodInfo, or simply generate the method name, without using "magic strings". Right now I'm doing the following: public void ...
0
votes
2answers
30 views

Getting an object property multiple times in a row vs getting it once and storing in a variable. Will the compiler optimize it anyway?

Is it better to store an object property when you access it multiple times in a row? Below is a rather silly example of getting an object property multiple times in a row and two ways of dealing with ...
0
votes
2answers
33 views

gcc fails with spawn: No such file or directory

I downloaded Ruben’s build of Cygwin GCC. However upon running it seems unable to compile any files $ touch foo.c $ gcc foo.c gcc: error: spawn: No such file or directory As a workaround, I ...
0
votes
2answers
67 views

Pseudocode Translation

I started working just a few hours ago on a pseudocode translator, which will translate a specific pseudocode, reguarding work with stacks and queues, to c/c++ executable code. The translator has ...
-4
votes
0answers
23 views

Does the basic .NET Framework Client Profile INCLUDE the cl.exe or other/s c/c++ compiler/s? [closed]

I'm trying to create an application that translates pseudocode to c/c++ code, so that it can be compiled and tested. This application should be able to access a c/c++ compiler FROM THE USER PC. Thanks ...
0
votes
1answer
32 views

HLSL compiler optimizes strange?

I am not an expert in HLSL compilers and how they work with branches but I have read different opinions about this issue. So to be concrete: In C/C++ it would make perfect sense to implement something ...
0
votes
1answer
32 views

Problems with linking C++ code

I'm tying to learn how to make and use a static library and I've faced some problems. This is what I've done. First I've written some code and placed in into String.h and String.cpp files. Then I've ...
-1
votes
0answers
24 views

Compiler Graph coloring and Register live ranges [closed]

Figure below is taken from tutorial. Based on live range table I am trying to built a graph and later perform coloring. My problem is that I don't understand why picture says that in column 5 it is ...
1
vote
1answer
30 views

Register live range

I am a studying compilers liveness and live ranges but a little bit confused. The figure below taken from tutorial and shows a live ranges for a given code. For example it says that R2 is loaded at ...
2
votes
1answer
41 views

Google Closure Source Map Not Connecting Source In Chrome

I'm using Google Closure to generate minified JS/source map and can't get the source map to connect the source to the minified script in the "Sources" window in Chrome. Code taken from the Google ...
4
votes
1answer
34 views

Make a Scala interpreter oblivious between interpret calls

Is it possible to configure a Scala interpreter (tools.nsc.IMain) so that it "forgets" the previously executed code, whenever I run the next interpret() call? Normally when it compiles the sources, ...
-10
votes
1answer
75 views

how a program maps onto a computer's memory and operations? [closed]

What writes compiler for functions and does it allocate memory for it ?and how? Generally it is easy to visualize that data structures are stored in memory. But how OPERATIONS? like statements in a ...

1 2 3 4 5 136
15 30 50 per page