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

Gabriel Dos Reis gdr@codesourcery.com
Tue Sep 11 04:01:00 GMT 2001


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



More information about the Libstdc++ mailing list