Minor Problem with g++

Minor Problem with g++

Post by Ghandehari, Davi » Thu, 04 Apr 1996 04:00:00



Out of a combination of boredom and curiosity, I decided to install the new
versions of libc, libg++, gcc, etc...  I decompress them in the root
directory as root, then run ldconfig..  everything seems to work ok...
the problem is that now whenever I compile anything that includes
iostream.h, it gives me implicit declaration warnings... everything
works fine after that (it seems), but it spews out warnings like nobodies
business.  I presume it has something to do with the new header files
that the g++ lib installs.  Here's a copy of the output I get:
]=================================[
g++ -Wall -fno-builtins -O2 -m486 -fno-strength-reduce  -c main.cc
/usr/include/g++/streambuf.h: In method `long int streambuf::pubseekoff(long
int, enum ios::seek_dir, int = 3)':
In file included from /usr/include/g++/iostream.h:31,
                 from main.cc:8:
/usr/include/g++/streambuf.h:351: warning: implicit declaration of function `int
_IO_seekoff(...)'
/usr/include/g++/streambuf.h: In method `long int streambuf::pubseekpos(long
int, int = 3)':
/usr/include/g++/streambuf.h:353: warning: implicit declaration of function `int
_IO_seekpos(...)'
]=================================[

Wondering what was going on, I grepped around in /usr/include/g++ for
these fuctions, and I found that _IO_seekoff and _IO_seekpos are both
declared as extern in the file libioP.h  The only thing that includes
it is iostreamP.h and nothing includes iostreamP.h  I don't even know
what it's for.  All iostreamP.h does is include streambuf.h and libioP.h.

Anyway, if anyone has any ideas, this kind of bothers me, as it obviously
shouldn't be giving me warnings from standard include files, and I wonder
if there's anything else more messed up that I haven't discovered yet.
Eep!  Erm, yeah, just mail me if you have any comments/suggestions.

 __        __             __________________________________

|__/      \__/ handehari  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 
 
 

1. Patch: linux-2.5.2-pre8/drivers/sound compilation fixes: MINOR-->minor

        Doing a global replace of "MINOR(" with "minor(" in all
.c files in linux/drivers/sound allows all of the sound drivers
to compile (at least as modules on x86).  This reflect the
changes in kdev_t introduced in linux-2.5.2-pre6.  You can do this
by applying the following patch *or* by the following shell command
(which is how I did it in the first place):

for file in $(find linux/drivers/sound -name '*.c' | xargs egrep -l 'MINOR\(' ) ; do
ed $file << DONE ; done
%s/MINOR(/minor(/g
DONE

        One note about this: this resulted in some drivers that
made the following rather obscure looking declarations:

        {
                int minor = minor(dev);
                ...
        }

        Apparently, the variable being declared is not in the scope
of its initialization value.  So, the code works, but it's not as
clear as could be.  I could rename the effected variables if need
be, although I that is something that individual device driver
maintainers could deal with at "leisure" just as well.

        I have not tested these changes.  I only know that they
make the sound drivers compile.

--
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104

+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

  sound.diffs
11K Download

2. EIZO 550i and SigmaLegend II

3. kde2 problems (on RH6.1) -- kdm fails, also minor icon problems

4. 2.5.61 (Yes, there are still Alpha users out there. :-) )

5. X ....and mouse problems incld. other minor problems.....

6. kill net radio formy LAN

7. Strange minor problems with CD and 2.2.19

8. GUI database - MS Access replacement

9. Minor Initialization Timing Problem

10. Minor problem with RXVT 2.0A

11. Minor problems with the SMC 8216 card

12. minor problems with 4.5 and Xfree86-4.2

13. Knotes - Minor Problem