public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/20356] New: New #include_next behaviour breaks limits.h
@ 2005-03-07  8:56 jakub at gcc dot gnu dot org
  2005-03-07  9:02 ` [Bug preprocessor/20356] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-03-07  8:56 UTC (permalink / raw)
  To: gcc-bugs

If some /usr/include header uses
#include "limits.h"
instead of
#include <limits.h>
it gets error: #include nested too deeply.
There are 2 limits.h headers, /usr/lib/gcc/*/*/include/limits.h and
/usr/include/limits.h that try to include each other with #include_next,
guarded with the defines that protect multiple header inclusion for the other
one.
" instead of < causes /usr/include/limits.h to be included first
(normally is /usr/lib/gcc/*/*/include/limits.h first) and this does:
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines.  */
# include_next <limits.h>

In older GCC releases, this include_next would load the next limits.h in the
search path, which is /usr/lib/gcc/*/*/include/limits.h, but GCC4 includes
/usr/include/limits.h again (and does so until reaching the nesting limit).

-- 
           Summary: New #include_next behaviour breaks limits.h
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: *-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20356


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-30  6:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07  8:56 [Bug preprocessor/20356] New: New #include_next behaviour breaks limits.h jakub at gcc dot gnu dot org
2005-03-07  9:02 ` [Bug preprocessor/20356] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-21  5:01 ` mmitchel at gcc dot gnu dot org
2005-07-08  1:38 ` mmitchel at gcc dot gnu dot org
2005-08-26 16:16 ` jakub at gcc dot gnu dot org
2005-08-30  6:28 ` cvs-commit at gcc dot gnu dot org
2005-08-30  7:27 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).