warning #1224 - deprecated header iostream in helloworld example

warning #1224 - deprecated header iostream in helloworld example

I am running Intel c++ 11.0 32 bit compiler on linux along with ganymede eclipse IDE. I have tried to setup the Eclipse system as per your installation documentation. But the HelloWorld sample project does not build error-free. It actually builds and runs, but I get this compile error:
================================================
icpc -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello\ World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp" /usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. #warning This file includes at least one deprecated or antiquated header. \
================================================
What am I doing wrong?

22 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - pollgreen
I am running Intel c++ 11.0 32 bit compiler on linux along with ganymede eclipse IDE. I have tried to setup the Eclipse system as per your installation documentation. But the HelloWorld sample project does not build error-free. It actually builds and runs, but I get this compile error:
================================================
icpc -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp" /usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. #warning This file includes at least one deprecated or antiquated header.
================================================
What am I doing wrong?

Hi
Remove .h , must only (no )
Best regards

Hi. Pollgreen.
I'll try to help figuring this out. But may I ask some questions?
1. What system (ex. RH EL4) are you using? Mine has /usr/include/c++/3.2.3 rather than 4.1.2, and I can't reproduce your problem.
2. Is the icpc command/warning messages you quoted what you see in the Eclipse/CDT Console window? I'm a little confused since you seem to have a couple of "-I"s in there, which don't show up in my environment.
3. In Eclipse/CDT, could you please turn on "-V" in the Property Pages (Project->Properties->Settings->Intel IA-32 C++ Compiler(v11.0.0)->General->Show Startup Banner(-V) ) and rebuild to see what compiler is actually picked up?
4. If you run the same icpc command outside of the eclipse on the command line (after running /opt/intel/Compiler/11.0/069/bin/iccvars.(c)sh, do you get the same warning message?

Hi, bustaf.
Are you sure the sample program has ? It seems seems to have .

Quoting - miwako

Hi. Pollgreen.
I'll try to help figuring this out. But may I ask some questions?
1. What system (ex. RH EL4) are you using? Mine has /usr/include/c++/3.2.3 rather than 4.1.2, and I can't reproduce your problem.
2. Is the icpc command/warning messages you quoted what you see in the Eclipse/CDT Console window? I'm a little confused since you seem to have a couple of "-I"s in there, which don't show up in my environment.
3. In Eclipse/CDT, could you please turn on "-V" in the Property Pages (Project->Properties->Settings->Intel IA-32 C++ Compiler(v11.0.0)->General->Show Startup Banner(-V) ) and rebuild to see what compiler is actually picked up?
4. If you run the same icpc command outside of the eclipse on the command line (after running /opt/intel/Compiler/11.0/069/bin/iccvars.(c)sh, do you get the same warning message?

Hi, bustaf.
Are you sure the sample program has ? It seems seems to have .

Hi miwako
I am not sure but this error is known as the white wolf ...
(Unix operating system side), add .h to iostream you have this error..
Best regards.

Quoting - miwako

1. What system (ex. RH EL4) are you using? Mine has /usr/include/c++/3.2.3 rather than 4.1.2, and I can't reproduce your problem.

Yes, the warning about deprecated headers is part of the g++ 4.x header implementation, so it depends on which g++ is active when running icpc. If you want more background on it, you could turn on your web browser and look in g++ discussions. Rather than asking questions here, you could check that your g++ gives the warnings, and ask any questions on gcc-help mailing list, where the experts hang out.

Quoting - bustaf

Hi
Remove .h , must only (no )
Best regards

Sorry. I should have said that I tried any and all combinations of INCLUDE styles. No difference!

Quoting - miwako

Hi. Pollgreen.
I'll try to help figuring this out. But may I ask some questions?
1. What system (ex. RH EL4) are you using? Mine has /usr/include/c++/3.2.3 rather than 4.1.2, and I can't reproduce your problem.
2. Is the icpc command/warning messages you quoted what you see in the Eclipse/CDT Console window? I'm a little confused since you seem to have a couple of "-I"s in there, which don't show up in my environment.
3. In Eclipse/CDT, could you please turn on "-V" in the Property Pages (Project->Properties->Settings->Intel IA-32 C++ Compiler(v11.0.0)->General->Show Startup Banner(-V) ) and rebuild to see what compiler is actually picked up?
4. If you run the same icpc command outside of the eclipse on the command line (after running /opt/intel/Compiler/11.0/069/bin/iccvars.(c)sh, do you get the same warning message?

Hi, bustaf.
Are you sure the sample program has ? It seems seems to have .

Hi miwako,
Thanks for the post. I turned on the banners(3) and cleaned and rebuilt. Here is the log. It shows the "Intel IA-32 C++ Compiler" which is exactly what I would have expected. I am confused by the posting by ?? below about g++. What does g++ have to do with this issue? I assume that the intel compiler REPLACES the g++ compiler. His post seems to imply that g++ is still used somehow. Can you explain that at all? I am not sure what you want me to do to answer#1from your post. And as for item 2, yes, this is the error text that is shown in the Eclipse Console window at the bottom. As for the -Is that I have, those are what I believe is needed to get visibility to the include libraries for TBB and the 11.0 C++ compiler. Without doing those, Eclipse can not find things like Complex or any of the TBB header files. If you know of a different/better way to get this all to work, I am listening.

**** Build of configuration Debug for project Hello World ****

make -k all
Building file: ../src/Hello World.cpp
Invoking: Intel IA-32 C++ Compiler
icpc -V -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I../test -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp"
Intel C++ Compiler Professional for applications running on IA-32, Version 11.0 Build 20080930 Package ID: l_cproc_p_11.0.069
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

Edison Design Group C/C++ Front End, version 3.10 (Oct 1 2008 21:30:45)
Copyright 1988-2007 Edison Design Group, Inc.

/usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
#warning This file includes at least one deprecated or antiquated header.
^

Finished building: ../src/Hello World.cpp

Building target: HelloWorld
Invoking: Intel IA-32 C++ Linker
icpc -L/opt/intel/Compiler/11.0/069/tbb/lib -o"HelloWorld" ./src/Hello World.o
Finished building target: HelloWorld
=======================================================

I went outside eclipse and tried your suggestion #4. I get same results.
=======================================================
[pollgri@pcasim Debug]$ pwd
/PCASIM/dev/pollgri/Hello World/Debug

[pollgri@pcasim Debug]$ icpc -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp"
/usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
#warning This file includes at least one deprecated or antiquated header.
^
=======================================================

Quoting - tim18

Yes, the warning about deprecated headers is part of the g++ 4.x header implementation, so it depends on which g++ is active when running icpc. If you want more background on it, you could turn on your web browser and look in g++ discussions. Rather than asking questions here, you could check that your g++ gives the warnings, and ask any questions on gcc-help mailing list, where the experts hang out.

tim18,
Can you explain to me why the version of g++ matters here? I am intending on using the Intel C++ 11.0 compiler. So, I would not even think I would ave to have a g++ compiler installed. Am I missing something here? I am new to most of this, so I apologize for questioning your post. I just need to understand. Thanks.

Quoting - pollgreen

Sorry. I should have said that I tried any and all combinations of INCLUDE styles. No difference!

Hi, pollgreen.
1. What do you mean by above? Do you mean you tried modifying the Hello World.cpp so that it either has or ?

2. you also said:

[start quote] --------------------------------------------------
went outside eclipse and tried your suggestion #4. I get same results.
=======================================================
[pollgri@pcasim Debug]$ icpc -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp"
/usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
#warning This file includes at least one deprecated or antiquated header.
[end quote] --------------------------------------------------

when this happened, did your Hello World.cpp have or ? The warning message seems to suggest it had (??). Do you get the same warning message if it has ?

3. Theunmodified Hello World.cpp (that you get when you create a sample program) should have . Did yours? Or did it have ??

Quoting - pollgreen

Can you explain to me why the version of g++ matters here? I am intending on using the Intel C++ 11.0 compiler. So, I would not even think I would ave to have a g++ compiler installed.

icpc supports inter-operability with the g++ which is active, including the use of all the g++ headers. icpc requires the g++ installation to provide the paths to libraries as well as headers. If your code is reported as deprecated by the g++ header you have selected, icpc replicates that.
On all platforms, Intel C++ inherits the C++ headers and STL from the required base compiler; it's not a stand-alone compiler.

Quoting - miwako

Hi, pollgreen.
1. What do you mean by above? Do you mean you tried modifying the Hello World.cpp so that it either has or ?

2. you also said:

[start quote] --------------------------------------------------
went outside eclipse and tried your suggestion #4. I get same results.
=======================================================
[pollgri@pcasim Debug]$ icpc -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp"
/usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
#warning This file includes at least one deprecated or antiquated header.
[end quote] --------------------------------------------------

when this happened, did your Hello World.cpp have or ? The warning message seems to suggest it had (??). Do you get the same warning message if it has ?

3. Theunmodified Hello World.cpp (that you get when you create a sample program) should have . Did yours? Or did it have ??

I mean that I get this same error no matter what I do with IOSTREAM. The original sample that came with the install had in it. Since that gave me this error, I also tried other formats. None worked. They all get the same error. What is stranger still to me is that the code actually generates an executable that runs with either version. So, how is the system resolving the cout call without iostream. BTW, if I comment it out completely, the code will not build. So, it seems like the compiler/linker are ok with it. But, maybe Eclipse is the issue somehow.

As you've found out, warning and error are treated entirely different. We can figure out what you mean by "work" only by context. icpc tries to follow the g++ precedent on this. Recent g++ still supports the headers with .h in the name, but gives you this vociferous warning, then tries to make it work.
If you want to verify whether it's an Eclipse issue, why don't you try your example by command line?

Quoting - tim18
As you've found out, warning and error are treated entirely different. We can figure out what you mean by "work" only by context. icpc tries to follow the g++ precedent on this. Recent g++ still supports the headers with .h in the name, but gives you this vociferous warning, then tries to make it work.
If you want to verify whether it's an Eclipse issue, why don't you try your example by command line?

See my post above to miwako. I did go outside of Eclipse. I get the same error/warning.

Hi Pollgreen.
This is not an Eclipse problem since you see the same warning on the command line.

I did find a system that has g++4.1 and was able to reproduce your problem but only if the source code has .

If youuse -E instead of -c in your icpc command and run it on the command line (and redirect it to a file), you wouldsee that Hello World.cpp includes
# 1 "/usr/include/c++/4.1.2/backward/iostream.h" 1 3
that would then include
# 1 "/usr/include/c++/4.1.2/backward/backward_warning.h" 1 3
The latter is the file that issues the warning you are seeing.

I can not figure out why you're seeing the same warning when the source code has .
Can you maybe send me the -E output from this case (with ), and also send me an output from
icpc -g [rest of your icpc arguments here] -#.
Thanks a bunch.

Hi.
Has there been a closure to this problem? If so, please let me know. thanks.
Miwako

Quoting - miwako
Hi.
Has there been a closure to this problem? If so, please let me know. thanks.
Miwako

No, this has not been solved. I was pulled off this problem to work on something else. I am now back trying to resolve this. I will try and do the things that were suggested above and reply accordingly. Stay tuned...

Quoting - miwako

Hi Pollgreen.
This is not an Eclipse problem since you see the same warning on the command line.

I did find a system that has g++4.1 and was able to reproduce your problem but only if the source code has .

If youuse -E instead of -c in your icpc command and run it on the command line (and redirect it to a file), you wouldsee that Hello World.cpp includes
# 1 "/usr/include/c++/4.1.2/backward/iostream.h" 1 3
that would then include
# 1 "/usr/include/c++/4.1.2/backward/backward_warning.h" 1 3
The latter is the file that issues the warning you are seeing.

I can not figure out why you're seeing the same warning when the source code has .
Can you maybe send me the -E output from this case (with ), and also send me an output from
icpc -g [rest of your icpc arguments here] -#.
Thanks a bunch.

I went outside of eclipse and ran this from the command line. I replaced -c with -E as you asked. It appears to work with no warnings:
======================================================
[pollgri@pcasim Debug]$ pwd
/PCASIM/dev/pollgri/Hello World/Debug

[pollgri@pcasim Debug]$ icpc -V -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -E -o "src/Hello World.o" "../src/Hello World.cpp"
Intel C++ Compiler Professional for applications running on IA-32, Version 11.0 Build 20080930 Package ID: l_cproc_p_11.0.069
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

Edison Design Group C/C++ Front End, version 3.10 (Oct 1 2008 21:30:45)
Copyright 1988-2007 Edison Design Group, Inc.

======================================================
What does that mean?
I then did the normal command line and get this:
======================================================

[pollgri@pcasim Debug]$ icpc -V -g -O0 -I/opt/intel/Compiler/11.0/069/include -I/opt/intel/Compiler/11.0/069/tbb/include -I/opt/intel/Compiler/11.0/069/tbb/include -MMD -MP -MF"src/Hello World.d" -MT"src/Hello World.d" -c -o "src/Hello World.o" "../src/Hello World.cpp"
Intel C++ Compiler Professional for applications running on IA-32, Version 11.0 Build 20080930 Package ID: l_cproc_p_11.0.069
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.

Edison Design Group C/C++ Front End, version 3.10 (Oct 1 2008 21:30:45)
Copyright 1988-2007 Edison Design Group, Inc.

/usr/include/c++/4.1.2/backward/backward_warning.h(32): warning #1224: #warning directive: This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.
#warning This file includes at least one deprecated or antiquated header.
^

The -E option just preprocesses the file (i.e. replaces the #include with the code actually being included).
It doesn't actuallycompile the file.

Normally the result of preprocessing would go to stdout (so you would see it on the screen) but since you have
also specified -o "src/Hello World.o" the preprocessed output will appear in your src/Hello_world.o file.

If you postthat file(or look at it) we/you should be able to tell where the #include is coming from.
Just search for iostream.h in theHello_world.o fileand see what is the file being includeddirectly above it.
Look forthe line beginning with #, for example this would tell me that iostream.h is being included by foo.h since
foo.h is directly above it:

# 1 "foo.h" 1

# 1 "/usr/include/c++/4.1.1/backward/iostream.h" 1 3

My guess is one of the header files from TBB is the one that's includingiostream.h If that is the case then
this header file should be (or should have been) corrected to include iostream instead.

Judy

Quoting - Judith Ward (Intel)

The -E option just preprocesses the file (i.e. replaces the #include with the code actually being included).
It doesn't actuallycompile the file.

Normally the result of preprocessing would go to stdout (so you would see it on the screen) but since you have
also specified -o "src/Hello World.o" the preprocessed output will appear in your src/Hello_world.o file.

If you postthat file(or look at it) we/you should be able to tell where the #include is coming from.
Just search for iostream.h in theHello_world.o fileand see what is the file being includeddirectly above it.
Look forthe line beginning with #, for example this would tell me that iostream.h is being included by foo.h since
foo.h is directly above it:

# 1 "foo.h" 1

# 1 "/usr/include/c++/4.1.1/backward/iostream.h" 1 3

My guess is one of the header files from TBB is the one that's includingiostream.h If that is the case then
this header file should be (or should have been) corrected to include iostream instead.

Judy

First of all, I saw this warning before I ever hooked into the TBB library, so I doubt that is the source of the problem. Secondly, I edited the .o file and there is NO occurence of "iostream.h" in the file. Just "iostream". So, I do not know what to do at this point. The data does not seem to make sense based upon what I was expecting. Any other ideas?

Quoting - pollgreen

First of all, I saw this warning before I ever hooked into the TBB library, so I doubt that is the source of the problem. Secondly, I edited the .o file and there is NO occurence of "iostream.h" in the file. Just "iostream". So, I do not know what to do at this point. The data does not seem to make sense based upon what I was expecting. Any other ideas?

Can you search the file for "backward_warning.h" and see what file is including that? Or just post the file and we can take a look...

thanks
Judy

Quoting - Judith Ward (Intel)

Can you search the file for "backward_warning.h" and see what file is including that? Or just post the file and we can take a look...

thanks
Judy

Here is that object file. I can not find backward in it at all.
I hope I posted it correctly. I had to create a folder apparently first.
Rick

A common way to get the backward warning is via
#include <.../hash_map> (and <.../hash_set).
If you can't avoid using that, you still have the option of -U__DEPRECATED (which g++ would do with the option -Wno-deprecated).

Leave a Comment

Please sign in to add a comment. Not a member? Join today