compiler

LLVM extern functions

I have recently started experimenting with LLVM under MinGW. I have read the Kaleidoscope tutorial but now I'm having problems with external functions. I'm declaring external functions like this: const Type* doubleType = Type::getPrimitiveType(ctx, Type::DoubleTyID); std::vector<const Type*> doubleParams; doubleParams.push_back(doubleT...

On which platforms/compilers sizeof(short) is NOT 2?

Tried to look for that and didn't find an answer. Can anyone help? Thanks. ...

Can I compile a class along with all of its inner classes to a single class file?

I've been working on a fairly simple project for a class. I knew it was supposed to be written in Java, and I read enough of the Assignment description to have an idea what I was supposed to be doing, so I set about creating a nice, object-oriented solution ('cause it's Java, right?). When I finally get to reading the nitty-gritty deta...

Is there a systematic way to discover which implicit defs are in scope, and which one is bound at a particular point?

Often there's no need to pay any attention to implicit arguments in Scala, but sometimes it's very helpful to understand how the compiler is automatically providing them. Unfortunately, this understanding seems to be hard to obtain! Is there a general method to discover how an implicit parameter has been provided, in a given piece of...

Java compiler/interpreter

Hi , Why we say java is compiled and interpreted language.What is the advantage over this(being compiled/interpreted) ...

Clang vs GCC - which produces better binaries?

I'm currently using GCC, but I discovered Clang recently and I'm pondering switching. There is one deciding factor though - quality (speed, memory footprint, reliability) of binaries it produces - if gcc -O3can produce a binary that runs 1% faster or takes 1% less memory, it's a deal-breaker. Clang boasts better compile speeds and lower...

Partially initialize variable defined in other module.

I'm considering a certain solution where I would like to initialize a cell of an array that is defined in other module (there will be many modules initializing one table). The array won't be read before running main (so there is not problem with static initialization order). My approach: /* secondary module */ extern int i[10]; // th...

PHP compiler for windows

I have a command line php app that I need to distribute to a client. I just want to give them an executable, not instructions for installing php ;) What is a good php compiler for windows that includes support for php 5, curl, TLS, and a few other libs I use? I need to control memory and time limit usage, so I must be able to use a cu...

Which compiler (Sun Studio or gcc ) to choose while porting from Solaris Sparc to Linux x86

We have decide to port our application that currently runs on solaris sparc to linux x86 system. Which compiler, Sun Studio or GNU gcc would be more beneficial to use on linux? Which one would produce at a good level of optimized binaries? Any help or directions would be appreciated! Thanks in advance. ...

Fast Standard ML compiler or bytecode interpreter, with read-eval-print loop, for Linux?

For use with a class I'll be teaching, I'm looking for a fast compiler or bytecode interpreter for Standard ML. I'm looking for fast compile times; any reasonable run time will do. Bonus if the compilation model is simple and clear. Students in the class will also be using MLton to generate good binaries, but MLton is slow to compile...

Undefined symbol building WWW::Curl::Easy Perl module on AIX 5.3

I'm trying to get the WWW::Curl::Easy Perl module installed on AIX 5.3. I have curl installed (from source) in /usr/local. When trying to build the Perl module, I get this: $ perl Makefile.PL Found curl.h in /usr/local/include/curl/curl.h Building curlopt-constants.c for your libcurl version Building Easy.pm constants for your libcurl ...

Is it possible to pre-compile ASP.Net website on a stopped IIS 6 site?

I have 2 sites on IIS, one is the live site and the other is a site that is only started when there is maintenance being carried out on the live site. In a deployment scenario I STOP the live site and the START the maintenance site so that users receive a friendly message advising of the upgrade. The only issue I have is when I start u...

Can I specify what class to use for string concatenation when using a java compiler?

I have a java 1.5 compiler, and I'd prefer not to also have a 1.4 compiler, but I need to use it because, apart from string concatenation, everything built using the 1.5 compiler works in a 1.4 environment. The only difference is between StringBuilder and StringBuffer. Is there a way to make the 1.5 compiler use the 1.4 string concaten...

Is there a way to speed up C++ compilation times in Solaris Sun Studio 12?

Since I am compiling my C++ code on a very server box (32 or 64 cores in total), is there a way of tweaking compiler options to speed up the compilation times? E.g. to tell compiler to compile independent .cpp files using multiple threads. ...

How does a compiled C++ class look like?

Hi all, With some background in assemble instructions and C programs, I can visualize how a compiled function would look like, but it's funny I have never so carefully thought about how a compiled C++ class would look like. bash$ cat class.cpp #include<iostream> class Base { int i; float f; }; bash$ g++ -c class.cpp I ran: bash$obj...

How does a compiled definition of struct look like in C?

Possible Duplicate: How does a compiled C++ class look like? Hi all, bash$cat struct.c struct test { int i; float f; }; bash$gcc -c struct.c The object file struct.o is of elf format. I am trying to understand what does this object file contain. The source code is just a definition of a struct. There is nothing executable...

C: Compiler info at runtime

Is there a way to print the name of the compiler and the version that was used to compile a program, something like; printf("This is compiled with %s version %s\n", COMPILER, COMPILER_VERSION); ? ...

g++ __FUNCTION__ replace time

Hi, can anyone tell when g++ replaces the __FUNCTION__ 'macro' with the string containing the function name? It seems it can replace it not until it has check the syntactical correctness of the source code, i.e. the following will not work #include <whatsneeded> #define DBG_WHEREAMI __FUNCTION__ __FILE__ __LINE__ int main(int argc, ch...

Objective C on Windows or Linux

I would like to learn objective-c, but don't have a Mac. How would I compile obj-c on Windows or Linux? I would prefer Windows, but Linux would be OK. ...

Does a JIT compiler have any disadvantages compared to a traditional compiler?

Possible Duplicate: JIT compiler vs offline compilers So until a few minutes ago I didn't really understand what the difference between a JIT compiler and an interpreter is. Browsing through SO, I found the answer, which brought up the question in the title. As far as I've found, JIT compilers have the benefit of being able to...