Topic: Strict ANSI mode v. #pragmas


Author: "Trevor L. Jackson, III" <fullmoon@aspi.net>
Date: 2000/07/14
Raw View
"Jeremy M. Jancsary" wrote:

> Scott Meyers wrote:
> >
> > On Wed, 12 Jul 2000 20:52:02 CST, Greg Comeau wrote:
> > > your code even if you add this.  BTW, did Borland accept it in strict
mode?
> >
> > I compiled it without any special switches, and I don't know what
Borland's
> > default mode is.
>
> The default mode is 'Borland extensions'. This mode is necessary to
> compile Borland's framework, the VCL.
>
> If you want to use the strict ANSI mode, you have to use the -A
> command-line switch.

In Borland v5.02 the -A switch generates complaints from standard header files
such
as <iomanip>, so -A is not terribly useful.

Off topic, <iomanip> uses some pragmas bracketing the template declarations in
an
attempt to suppress the complaints.  However, the templates aren't compiled
until
the file is parsed, by which time the pragmas have reset the warning
suppression.
Is there anything in the standard that addresses the context necessary to
handle
this kind of deferred compilation?



---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Edward Diener <eddielee@abraxis.com>
Date: 2000/07/14
Raw View
The 5.5 compiler is light years beyond the BC++ 5.02 compiler ( there has been
Borland C++ Builder 1, BCB3, BCB4, and BCB5 in the interim ) . The default mode
still is 'Borland extensions" however so the -A switch still needs to be used for
string ANSI code.

"Trevor L. Jackson, III" wrote:

> "Jeremy M. Jancsary" wrote:
>
> > Scott Meyers wrote:
> > >
> > > On Wed, 12 Jul 2000 20:52:02 CST, Greg Comeau wrote:
> > > > your code even if you add this.  BTW, did Borland accept it in strict
> mode?
> > >
> > > I compiled it without any special switches, and I don't know what
> Borland's
> > > default mode is.
> >
> > The default mode is 'Borland extensions'. This mode is necessary to
> > compile Borland's framework, the VCL.
> >
> > If you want to use the strict ANSI mode, you have to use the -A
> > command-line switch.
>
> In Borland v5.02 the -A switch generates complaints from standard header files
> such
> as <iomanip>, so -A is not terribly useful.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]