Compile warning with fstream.h

bridged with qdn.public.qnxrtp.devtools
Post Reply
Bill Caroselli

Compile warning with fstream.h

Post by Bill Caroselli » Fri Nov 07, 2003 10:28 pm

If I include <fstream.h> in a C++ program and try to compile with
warning set high, I get warnings from xlocale about local variables
shadowing class members with the same name.

If I were to write code like this, I would want the compiler to warn
me about the possible mistake. So I'd rather not disable this warning.

The variables and line numbers in question are:
_Off: 331
_Refs: 382, 453, 458, 552, 557, 734, 805, 810, 984 & 994.

And again I see in xlocnum:
_Refs: 45, 50, 158, 163, 631, 636

And in ios:
_Except: 32, 41

And in istream:
_Noinit: 23
_Ctype: 740, 827

All of these are in /usr/include/cpp.

Is there a chance in hell that the header files will get fixed?

--
Bill Caroselli -- Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

Garry Turcotte

Re: Compile warning with fstream.h

Post by Garry Turcotte » Tue Nov 11, 2003 3:37 pm

Apparently it is fixed in 6.21B
Lacking a sample, I just included everything from
/usr/include/cpp and compiled 'QCC -Wall -c testerooni.cc'
No warnings.

Bill Caroselli wrote:
If I include <fstream.h> in a C++ program and try to compile with
warning set high, I get warnings from xlocale about local variables
shadowing class members with the same name.

If I were to write code like this, I would want the compiler to warn
me about the possible mistake. So I'd rather not disable this warning.

The variables and line numbers in question are:
_Off: 331
_Refs: 382, 453, 458, 552, 557, 734, 805, 810, 984 & 994.

And again I see in xlocnum:
_Refs: 45, 50, 158, 163, 631, 636

And in ios:
_Except: 32, 41

And in istream:
_Noinit: 23
_Ctype: 740, 827

All of these are in /usr/include/cpp.

Is there a chance in hell that the header files will get fixed?

Bill Caroselli

Re: Compile warning with fstream.h

Post by Bill Caroselli » Tue Nov 11, 2003 5:06 pm

I am running 6.21B.

I will post a short complete example.

Garry Turcotte <garry@qnx.com> wrote:
GT > Apparently it is fixed in 6.21B
GT > Lacking a sample, I just included everything from
GT > /usr/include/cpp and compiled 'QCC -Wall -c testerooni.cc'
GT > No warnings.

GT > Bill Caroselli wrote:
If I include <fstream.h> in a C++ program and try to compile with
warning set high, I get warnings from xlocale about local variables
shadowing class members with the same name.

If I were to write code like this, I would want the compiler to warn
me about the possible mistake. So I'd rather not disable this warning.

The variables and line numbers in question are:
_Off: 331
_Refs: 382, 453, 458, 552, 557, 734, 805, 810, 984 & 994.

And again I see in xlocnum:
_Refs: 45, 50, 158, 163, 631, 636

And in ios:
_Except: 32, 41

And in istream:
_Noinit: 23
_Ctype: 740, 827

All of these are in /usr/include/cpp.

Is there a chance in hell that the header files will get fixed?
--
Bill Caroselli -- Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

Bill Caroselli

Re: Compile warning with fstream.h

Post by Bill Caroselli » Thu Nov 20, 2003 8:06 pm

I don't know. I kind of moved on to another project. I'll try it
again now that I understand a little more about what I was doing.


Garry Turcotte <garry@qnx.com> wrote:
GT > Has this been resolved?

GT > Bill Caroselli wrote:
I am running 6.21B.

I will post a short complete example.

Garry Turcotte <garry@qnx.com> wrote:
GT > Apparently it is fixed in 6.21B
GT > Lacking a sample, I just included everything from
GT > /usr/include/cpp and compiled 'QCC -Wall -c testerooni.cc'
GT > No warnings.

GT > Bill Caroselli wrote:

If I include <fstream.h> in a C++ program and try to compile with
warning set high, I get warnings from xlocale about local variables
shadowing class members with the same name.

If I were to write code like this, I would want the compiler to warn
me about the possible mistake. So I'd rather not disable this warning.

The variables and line numbers in question are:
_Off: 331
_Refs: 382, 453, 458, 552, 557, 734, 805, 810, 984 & 994.

And again I see in xlocnum:
_Refs: 45, 50, 158, 163, 631, 636

And in ios:
_Except: 32, 41

And in istream:
_Noinit: 23
_Ctype: 740, 827

All of these are in /usr/include/cpp.

Is there a chance in hell that the header files will get fixed?



--
Bill Caroselli -- Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

Garry Turcotte

Re: Compile warning with fstream.h

Post by Garry Turcotte » Thu Nov 20, 2003 8:22 pm

Has this been resolved?

Bill Caroselli wrote:
I am running 6.21B.

I will post a short complete example.

Garry Turcotte <garry@qnx.com> wrote:
GT > Apparently it is fixed in 6.21B
GT > Lacking a sample, I just included everything from
GT > /usr/include/cpp and compiled 'QCC -Wall -c testerooni.cc'
GT > No warnings.

GT > Bill Caroselli wrote:

If I include <fstream.h> in a C++ program and try to compile with
warning set high, I get warnings from xlocale about local variables
shadowing class members with the same name.

If I were to write code like this, I would want the compiler to warn
me about the possible mistake. So I'd rather not disable this warning.

The variables and line numbers in question are:
_Off: 331
_Refs: 382, 453, 458, 552, 557, 734, 805, 810, 984 & 994.

And again I see in xlocnum:
_Refs: 45, 50, 158, 163, 631, 636

And in ios:
_Except: 32, 41

And in istream:
_Noinit: 23
_Ctype: 740, 827

All of these are in /usr/include/cpp.

Is there a chance in hell that the header files will get fixed?



Post Reply

Return to “qdn.public.qnxrtp.devtools”