[cfe-dev] Handling legacy VC++ deficiencies

Nikola Smiljanic popizdeh at gmail.com
Tue Aug 28 06:47:57 PDT 2012


Stuff like this is generally added under the -fms-compatibility,
provided there's "enough" code out there that depends on it. I'm not
sure if MFC itself uses this style, or if it's only the wizard
generated MFC code?

On Tue, Aug 28, 2012 at 3:35 PM, David Robins <llvm at davidrobins.net> wrote:
> Visual Studio 2005 generated a lot of code that uses unqualified
> pointers to member functions (think MFC dispatch tables; fear and
> loathing, sure, but the code is out there), and even 2012 supports them,
> although it now generates fully-qualified names ("&Class::Function", vs.
> accepting "Function" without "&" or "Class::"). I understand C++
> requires a qualified name; on the other hand, I want to compile this
> corpus of legacy code with Clang (for analysis, not building).
>
> Another issue in such legacy code is expecting inheritance of typedefs
> in templates, whereas the standard requires redeclaring them explicitly
> (e.g., types like value_type and pointer).
>
> I remember seeing in another email that Clang does not want to be "bug
> for bug compatible" with MSVC (and in yet another support for the bug
> where VS 2005 eats a comma in varargs macros); what's the best way to
> support compiling legacy code? Is it to be entirely unsupported? Can a
> plugin do it? Or will changes restricted to particular Microsoft compiler
> emulation (-fmsc-ver) be accepted?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list