This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: ummm.... why is there a limits.h file now?


Benjamin Kosnik <bkoz@redhat.com> writes:

| I was looking through bits/c++config, and saw:
| 
| // And any CPU-specific definitions.
| #include <bits/limits.h>
| 
| Here's what's wrong with this:
| 
| 1) limits.h is a "C" compatibility header. Use something besides this,
|    say cpu_limits.h. (No point in confusing things, especially since
|    glibc has a bits subdir as well.)

You're 101% right -- I missed that that when it went in.

| 2) there should be no includes in c++config, if possible. This should
|    just be included in bits/std_limits.h:
| 
| #include <bits/c++config.h>
| #include <bits/cpu_limits.h>
| 
| Thoughts?

You're right.

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com


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