compiler

Performance impact of -fno-strict-aliasing

Is there any study or set of benchmarks showing the performance degradation due to specifying -fno-strict-aliasing in GCC (or equivalent in other compilers)? ...

How to manipulate C# AST?

I am working on a Reverse Engineering school project, which requires to translate manipulate AST of compiled C# project. I have seen the post on "Translate C# code into AST?" in this website, but it doesn't look like the one I am looking for. According to what I knew, currently C# doesn't provide a library class that does sth like that f...

Why VC++ 2008 compiler takes too much time on link stage?

I have automatic generated code (around 18,000 lines, basically a wrap of data) and other about 2,000 lines code in a C++ project. The project turned on the link-time-optimization operation. /O2 and fast-code optimization. To compile the code, VC++ 2008 express takes incredibly long time (around 1.5 hours). After all, it has only 18,000 ...

How does the compiler determine which member functions mutate?

A comment to one of my posts interested me: Me too. I also give accessors/mutators the same name. I was wondering about this, because I have always used setBar(int bar) instead of a mutator named the same thing. I want to know: can the compiler determine based on a const identifier what mutates at runtime, or can it use the same fu...

Learning C++ without an IDE

I've recently started to learn C++ and am completely confused with the choices of IDEs and compilers out there. I am competent with interpreted languages and like the simplicity of using any IDE or text editor and then running the interpreter from the command line. Everything works as I expect, regardless of the IDE used, because I use t...

Can a compiled language be homoiconic?

By definition the word homoiconic means: Same representation of code and data In LISP this means that you could have a quoted list and evaluate it, so (car list) would be the function and (cdr list) the arguments. This can either happen at compile- or at run-time, however it requires an interpreter. Is it possible that compiled l...

Flex : Assignment in Conditionals

If I use an Assignment within conditional, for e.g. if(userType='admin') Flex throws a warning,unlike Java, which throws an error. Why should Flex be doing this, despite being one of the newest languages? 1100: Assignment within conditional. Did you mean == instead of =? ...

How do you force C++ compilation on a .c file using VxWorks MIPS compiler?

I'm using the VxWorks MIPS compiler and I have some third party source that needs to be compiled as c++ but all the extensions are .c. There must be a switch I can pass into the compiler in this case to force C++ compilation but I can't find it. Any suggestions? ...

How to use the "classes" parameter of JavaCompiler.getTask()?

I'm trying to understand JavaCompiler.getTask(). I understand all the parameters except for the second to last one called classes. The Javadoc read: class names (for annotation processing), null means no class names but I don't understand what they mean. I found plenty of websites referring to JavaCompiler online, but none of them ...

Are libfoo.a and foo.lib compatabile formats?

Some build scripts (such as the one in numpy) simply does the following to make a gcc-compiled library archive work with the Visual Studio linker: copy libfoo.a foo.lib Surprisingly it seems to work. Does anyone know why? ...

VB.NET SLOW Compile Time - No disk or CPU activity

We have a project for a client that is written in VB.NET. In one of the projects, we have about 100 modules, which are all VERY simple. They're extension methods that convert between object types. Here is a small snippet: Public Module ScheduleExtensions <System.Runtime.CompilerServices.Extension()> _ Public Function ToServicesData(ByV...

Can I add a linq compiler to my project?

I'd like to allow some of our business analysts to write in linq instead of SQL where applicable. Corporate would never go for allowing linqpad to be installed, so where would I start on learning how to allow say simple linq queries or expressions in vs2008 project? Is there sometype of eval() function for .net that would compile and ru...

Why is VC++ C4150 (deletion of pointer to incomplete type) only a warning?

Of course, warning must be treated, but why is VC++ C4150 (deletion of pointer to incomplete type) only a warning? ...

Compile to xslt?

The answer to this may very well be no, as much searching has turned up nothing. I thought long ago I saw something like this, but it may all have been a mirage. Basically, it's so atrociously awful writing xslt out by hand. It's not the functional paradigm that bothers me. What bothers me is the fact that it uses XML based syntax. I wo...

How to get Flex command-line compc to compile one source path when referenced images are at another directory?

We are having an issue with embedded images when using the compc command-line compiler to generate an .swc for a bunch of library classes. Our directory structure is like this: (some directory structure)/flexprojects/MyLib/src/ (flex packages and classes here) (some other directory structure)/myapp.war/image/ (image files here) Whe...

differences when compiling a project using flex builder and flex sdk

The following code compiles fine in flex builder 3, but throws an error when compiled using the command line and flex sdk 3.3. <?xml version="1.0" encoding="utf-8"?> <ww:TestApplication xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ww="*" layout="absolute" backgroundColor="#FFFFFF" > <mx:Label x="10" y="10" tex...

C#: Location of const variable in a binary

Is it possible to know the location of const variables within an exe? We were thinking of watermarking our program so that each user that downloads the program from our server will have some unique key embedded in the code. Is there another way to do this? ...

Are there conclusive studies/experiments on C compilation using a C++ compiler?

I've seen a lot of arguments over the general performance of C code compiled with a C++ compiler -- I'm curious as to whether there are any solid experimental studies buried beneath all the anecdotal flame wars you find in web searches. I'm particularly interested in the GCC suite, but any data points would be interesting. (Comparing the...

(Delphi) Check state of a switch directive in the function caller's environment

I know that I can check the current state of Delphi's switch directives using this construct: {$IFOPT R+} Writeln('Compiled with range-checking'); {$ENDIF} Since I'm lacking of in-depth sources on how the Delphi backend compiler works, I'm not sure wether there is a way of changing the behaviour of a function depending on the st...

How do I get autotools to compile with the Intel compiler?

I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen? ...