This is the mail archive of the 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]
Other format: [Raw text]

Re: problem in nested include -- missing a definition?

Jonathan Wakely wrote:
On 31/10/14 14:51 -0700, Linda A. Walsh wrote:
I'm getting the following error:
In file included from /usr/include/features.h:364:0,
               from /usr/include/limits.h:25,
from /usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed/limits.h:168, from /usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed/syslimits.h:7, from /usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed/limits.h:34,
               from /usr/include/c++/4.8/climits:41,

None of these headers come from libstdc++ except <climits> which just
includes <limits.h> so your problem is with your C library
installation and nothing to do with libstdc++.
   From the rpm database, 2 were from glibc, 2 were from
the gcc installation, and 1 from g++.  As I wasn't using gcc, they seemed
to be grouped more with g++ than glibc -- thus 60% shot based on my
g++ usage.  ;-)  Something seems odd with 'features.h' as it said assert.h
was called from 'features.h', but at line number #364 in features.h
I see an include of  "sys/cdefs.h" -- the file you say I need.

But from the include listing that g++ puts out, that file isn't included
at all.

I.e. @ features.h, I see, included, the file you say it is in, NOT cassert.h:

At features.h#364, I see:

(#361)/* This is here only because every header file already includes this one. */
(#362)#ifndef __ASSEMBLER__
(#363)# ifndef _SYS_CDEFS_H
(#364)#  include <sys/cdefs.h>
(#365)# endif

The include-chain list shows "cassert.h" being included @ 364, not sys/cdefs.h.

That the file you mention that has the right def (sys/cdefs.h) is included at the at the end of the include-list above but before 'cassert.h' seems to indicate
the include-chain list is missing the inclusion of sys/cdefs.h, even though
the "limits.h"@364 has it in the source.


Thanks... at least I have an idea where to kludge around it.

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