Re: /Za option
- From: "pba" <apbogdan@xxxxxxxxx>
- Date: 1 Nov 2005 10:49:25 -0800
I am not sure you read what I wrote : what I'm trying to find out is
what is left out and what gets in when you use /Za. Za is advertised to
disable MS extensions and is supposed to be used to check for
portability problems, and portability assumes - of course - you will
not be including any windows specific headers. To be more specific, I
expect the compilation of the following program to fail (note there are
no windows spec. hdrs ):
#include <iostream>
class __declspec(novtable) base
{
public:
virtual void beep() {}
};
class test : public base
{
public
void beep() {};
};
int main(void)
{
test *p = new test();
p->beep();
return (EXIT_SUCCESS);
}
John Carson wrote:
> "pba" <apbogdan@xxxxxxxxx> wrote in message
> news:1130249549.422097.14990@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > With VS 2003 it builds just fine, it accepts __declspec, xor and
> > __COUNTER__ - to name just a few extensions.
>
> I am not sure if you read what I wrote. If I attempt to build the following
> using /Za
>
> #include "windows.h"
> int main()
> {}
>
> then I get 49 errors.
>
> It is true that you can still use some Microsoft specific code with /Za.
> That, however, falls a long way short of allowing you to do most sorts of
> Windows programming.
>
> --
> John Carson
.
- Follow-Ups:
- Re: /Za option
- From: John Carson
- Re: /Za option
- Prev by Date: Re: Compiler terms
- Next by Date: Re: Character pointers?
- Previous by thread: Re: Why does use of fstream to open file fails with new style headers?
- Next by thread: Re: /Za option
- Index(es):
Relevant Pages
|