This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: #include <new.h> now causes a warning

Joe Buck <> writes:

| I wrote:
| > | I think that -Wdeprecated should not be implied by -Wall, but should be
| > | asked for explicitly.
| Gabrial Dos Reis writes:
| >   I have no opinion on that.  However, there ought to be a way to
| > educate users to move to standard headers as soon as possible.
| > | For example, it will tell people to turn <math.h> into <cmath>, resulting
| > | in a program that won't compile with the current default compiler on any
| > | GNU/Linux platform.
| > 
| > Is that *really* the case? 
| > 
| > C-headers are not backward headers and I don't see how they can
| > trigger that warning.
| The original report claimed that this was so (that math.h would get a
| warning), and I did not verify it myself as I've been testing the 3.0
| branch, not the trunk.

I think the orginal report was speaking of <new.h>:

   > In file included from /usr/local/include/g++-v3/backward/new.h:33,
   >                  from /opt2/home/craigr/ACE_wrappers/ace/OS.h:2950,
   >                  from OS.cpp:3:

| So: Which headers issue the warning?

The headers located in backward/ directory -- old form of classic
IOStreams and old HP/SGI-STL style headers.

| Are there any cases where the user is directed to use a header that
| is not present in gcc 2.95.x?  

Not that I'm aware of.  <sstream> was back-ported in 2.95.2 or 2.95.3.

But it depends on what you mean by "header": Is it just the spelling
or does the containt matter?

-- Gaby

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]