bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

namespace nesting bug in mathcalls.h


From: Chris Quenelle
Subject: namespace nesting bug in mathcalls.h
Date: Mon, 19 Dec 2005 13:00:19 -0800
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050323)


Is there someplace I can easily check one file in the "latest
and greatest" glibc sources?  It would save me from
worrying about some bugs/problems if I knew they
would probably eventually migrate into the distros we support.

Here is an issue we discovered:

  /usr/include/bits/mathcalls.h:277 has this
      __BEGIN_NAMESPACE_C99

  which translates into

      namespace __c99 {

  However, the matching "}" (see /usr/include/bits/mathcalls.h:356)
  is protected by #ifdef __USE_ISOC99 (/usr/include/bits/mathcalls.h:300)
  and since C++ doesn't define __USE_ISOC99 the matching "}" is not
  being generated.


At the top of mathcalls.h the NAMESPACE macros are closely nested
inside the #ifdefs.  But later in the file, the NAMESPACE macros
start to get separated by more distance, and eventually (around line 300)
they are covered by different #ifdef macros, which can sometimes
result in mismatched open and close braces.


--chris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]