compiler

Macro Replacement during Code Generation

Presently I have a some legacy code, which generates the op code. If the code has more number of macros then the code generation takes so much of time (In terms of hours!!). I have gone through the logic, they are handling the macro by searching for it and doing a replace of each variable in it some thing like inlining. Is there a way th...

warning C4244: 'argument' : conversion from 'SIZE_T' to 'DWORD', possible loss of data

I need to have a set of overloaded functions in my code but I get convertion wanrings. Here is a test code: #include windows.h void f(DWORD arg){...} //void f(SIZE_T arg){} void main(void) { DWORD dword=0; SIZE_T size_t=dword; f(size_t); } The compiler gives warning: test.cpp(11) : warning C4244: 'argument' : conversion from 'SIZ...

How can I use gcc to compile x86 assembly code on an x64 computer

For a school assignment I have to write x86 assembly code, except I can't use gcc to compile it since my computer is an x64 machine, and gcc is only excpecting x86 code. Is there a command that'll make gcc accept it x86 assembly code? Thanks P.S. I know my code is valid since it compiles just fine on x86 machines. ...

Can you compile code on the fly in Silverlight?

I should clarify that I am looking for a client-side solution. Alternatively, is there a C# compiler written in managed code? ...

Child Scope & CS0136

The following code fails to compile stating "A local variable named 'st' cannot be declared in this scope because it would give a different meaning to 'st', which is already used in a 'child' scope to denote something else": var l = new List<string>(); l.Find(st => st.EndsWith("12")); string st = "why this fail...

Do you use regular builds as a coding tool?

We have a large (about 580,000 loc) application which in Delphi 2006 builds (on my machine) in around 20 seconds. When you have build times in seconds, you tend to use the compiler as a tool. i.e. write a little code, build, write some more code and build some more etc etc As we move some of our stuff over to C#, does anyone have a compa...

Ajax Control Toolkit - Toolscriptmanager not available

I've been trying to get this asp.net 2.0 application up and running with little success. I removed all references and added the ajax control toolkit again and I'm still getting "ToolScriptManager:ID property not specified". Any help? Screenshot included. Thanks! ...

How can I speed up the compile / publish time of Flash IDE projects

I'm sick of waiting hours for Flash to publish. .NET / VisualStudio projects are WAAAAY faster - is that only compiling the classes that have changed? Update: Does the Flash IDE re-encode all your sounds and images every time you publish? Can't it cache them somewhere? ...

Is there C# look-alike for Linux?

Is there C# look-alike for Linux? What about a compiler? ...

Would it be reasonable to self-study the dragon book?

I've been out of school for about 2 years and didn't take a compilers course as an undergrad. At this point, it's something I'm interested in and am wondering if it would be reasonable for me to get a copy of the dragon book and self study? what other resources might you recommend to guide me? I find that I learn best by doing, so I...

Why does C++ compilation take so long?

Compiling a C++ file takes a very long time when compared to C#, Java. It takes significantly longer to compile a C++ file than it would to run a normal size Python script. I'm current using VC++ but it's the same with any compiler. Why is this? The two reasons I could think of were loading header files and running the preprocessor, but...

intel compiler on vista: "unable to obtained mapped memory"

Hi all, I'm getting the following error when trying to compile C++ projects using intel compiler version 10.0.025 on vista business edition (sp1) in vs2008: unable to obtain mapped memory (see pch_diag.txt) There is no such file as pch_diag, so that's a bit disheartening. If I try to just use the microsoft compiler, all of my call...

Accessing non top-level class without a top level class in java

I have a java file TestThis.java like following: class A { public void foo() { System.out.println("Executing foo"); } } class B { public void bar() { System.out.println("Executing bar"); } } The above code file is compiling fine without any warnings/errors. My question is that is there any way ...

Are there any web-based, standalone (no-install), or no-admin installer compilers for C#

Hi All, I'm looking to spend a bit of my lunch break each day teaching myself some C#. I have access to some books on the subject via my employer-paid Books24x7 subscription, but I have no way of running code while I'm at work. My work PC is rather locked down (no admin privileges, read-only "Program Files" - though install to a deskto...

Does the Microsoft Visual C++ Express compiler compile C code?

I'm not sure, will the visual c ++ compiler express edition work for compiling c and if not can someone link me to an easy c compiler to use. Thanks in advance. ...

Left to right expression evaluation

In C# is it guaranteed that expressions are evaluated left to right? For example: myClass = GetClass(); if (myClass == null || myClass.Property > 0) continue; Are there any languages that do not comply? ...

Is there a compiler or IDE for C on Windows that's regarded as an industry standard?

Taking advice from this post, I purchased a copy of 'The C Programming Language' and am happily reading my way through. However, all the stuff I've written in the past has been interpreted, and I have no idea where to look for a good C compiler or an IDE (is there even one?). Google searches throw up a lot of results for C++ compilers, w...

F1001 Internal code generator error in RAD STUDIO 2009

I'm getting this worthless error in my code. it's very consistant and restarting the compiler hasn't done anything. Has anyone else ever solved this? while( int CharPos = _Message.Pos(_What) ) { _Message.Insert( _With, CharPos); _Message.Delete(CharPos + 1, 1); } ...

Plugging in to Java compilers

I have a post-compilation step that manipulates the Java bytecode of generated classes. I'd like to make life as painless as possible for library consumers, so I'm looking at ways I can make this process automatic and (if possible) compiler agnostic. The Annotation Processing API provides many of the desired features (automatic service ...

How do C/C++ compilers handle type casting?

I am curious to know how Type Casting happens without loss of data inside the compiler. For example: int i = 10; UINT k = (UINT) k; float fl = 10.123; UINT ufl = (UINT) fl; // data loss here? char *p = "Stackoverflow Rocks"; unsigned char *up = (unsigned char *) p; How does the compiler handle this type of typecasting. A lo...