I have a generic class that I'm trying to implement implicit type casting for. While it mostly works, it won't work for interface casting. Upon further investigation, I found that there is a compiler error: "User-defined conversion from interface" that applies. While I understand that this should be enforced in some cases, what I'm tr...
I have a home-spun 2000 lines VBScript script, that has become progressively slow with each additional code I add. It was created as a private debugging aid and now that it has become really useful. I want to polish it and ship it along with our product.
I thought I could speed it up by compiling it and making it an EXE. Furthermore I w...
How do you specify a target framework version for the csc.exe c# compiler via command-line invocation (e.g., no .csproj file and not going thru the MSBUILD engine)?
e.g, using the C# 3.0 csc.exe compiler, how do you compile to IL targeting the 2.0 .net framework?
...
How does a new programming language get established? How could I design one and be famous? What steps would I need to take to get it 'Out There'?
...
What is the most reliable way to find out CPU architecture when compiling C or C++ code? As far as I can tell, different compilers have their own set of non-standard preprocessor definitions (_M_X86 in MSVS, __i386__, __arm__ in GCC, etc).
Is there a standard way to detect the architecture I'm building for? If not, is there a source for...
Can I run the python interpreter without generating the compiled .pyc files?
...
Is there a way to increase the stack size of a Windows application at compile/link time with GCC?
...
I have the dragon book and Modern Compiler Implementation in ML. I'm looking for other good resources on code generation in a compiler. Can you recommend any?
...
I can't shake this error when compiling my Visual Studio.NET 2008 solution. The project that's generating the error is a VB.NET Web Application in a 12 project solution (mixed types and languages).
I've tried all the tricks I can find on google, and the obvious of removing the directoy and folder manually.
I'm running Vista Business 3...
Even if it requires manual input. Is there any good-enough option available?
...
Does the compiler optimize out any multiplications by 1? That is, consider:
int a = 1;
int b = 5 * a;
Will the expression 5 * a be optimized into just 5? If not, will it if a is defined as:
const int a = 1;
...
For example, suppose I have a class:
class Foo
{
public:
std::string& Name()
{
m_maybe_modified = true;
return m_name;
}
const std::string& Name() const
{
return m_name;
}
protected:
std::string m_name;
bool m_maybe_modified;
};
And somewhere else in the code, I have something l...
What's the best stable C++ IDE with a GUI that runs on linux?
...
Does anyone know the full list of C# compiler number literal modifiers?
By default declaring '0' makes it an Int32 and '0.0' makes it a 'Double'. I can use the literal modifier 'f' at the end to ensure something is treated as a 'Single' instead. For example like this...
var x = 0; // x is Int32
var y = 0f; // y is Single
What ar...
I know that the #warning directive is not standard C/C++, but several compilers support it, including gcc/g++. But for those that don't support it, will they silently ignore it or will it result in a compile failure? In other words, can I safely use it in my project without breaking the build for compilers that don't support it?
...
I recently added -pedantic and -pedantic-errors to my make gcc compile options to help cleanup my cross platform code. All was fine until it finds errors in external included header files. Is there a way to turn off this error checking in external header files IE:
Keep checking for files included like this:
#include "myheader.h"
Stop...
I have a question about asp.net compiling. I know the different ways you can compile but my question is with the default method. Microsoft says that pages and code are compiled on their first use and then cached. My question is, when does that cache clear... when the app pool recycles? Or, does it cache it until it's changed even thr...
Trying to use an excpetion class which could provide location reference for XML parsing, found an interesting behavior - compiler could not choose between overload which consumes an interface and one which needs System.Exception when I trying to pass XmlReader as a parameter.
Detais are following:
//exception overloads:
public FilterXm...
When extending classes, I find it very descriptive to use the base (MyBase in VB) keyword when accessing methods in the base-class. And the this (Me in VB) keyword when accessing functions in the class extending the base-class. That goes for a "flat" structure with no inheritance as well.
I find it easier to read this:
public class Wor...
I've worked on many projects where I've been given code by others to update. More often than not I compile it and get about 1,000+ compiler warnings. When I see compiler warnings they make me feel dirty, so my first task is to clean up the code and remove them all. Typically I find about a dozen problems like uninitialized variables such...