This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/16182] [3.4.1, 3.5.0 regression] wctype.h not included by c++locale_internal.h


------- Additional Comments From rearnsha at gcc dot gnu dot org  2004-06-25 00:51 -------
This would appear to be a bug in configure.  Note that it also affects 3.4.1
since the change was installed there as well.

linkage.m4 defines a function to test for linkage of certain builtin functions,
for example __builtin_abs.  If the test succeeds, then AC_DEFINE is used to
generate an entry in configure to write to confdefs.h as follows:

cat >>confdefs.h <<\_ACEOF
#define ${ac_tr_func} 1
_ACEOF

Now my manual for bash says:

       The format of here-documents is:

              <<[-]word
                      here-document
              delimiter

       No parameter expansion, command substitution, arithmetic expansion,  or
       pathname expansion is performed on word.  If any characters in word are
       quoted, the delimiter is the result of quote removal on word,  and  the
       lines  in the here-document are not expanded.  If word is unquoted, all
       lines of the here-document are subjected to parameter  expansion,  com-
       mand  substitution,  and arithmetic expansion.  

So since _ACEOF is quoted the line is written without expansion directly into
confdefs.h.  When that is then compiled it causes the compiler to error out on
all subsequent tests.

The solution appears to be to use AC_DEFINE_UNQUOTED in linkage.m4, but that is
exactly what Ben removed in his patch of 10th June.  I don't understand why,
though it was done here:
http://gcc.gnu.org/ml/libstdc++/2004-06/msg00065.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at redhat dot com, mark
                   |                            |at codesourcery dot com
      Known to fail|                            |3.5.0 3.4.1
      Known to work|                            |3.4.0
            Summary|wctype.h not included by    |[3.4.1, 3.5.0 regression]
                   |c++locale_internal.h        |wctype.h not included by
                   |                            |c++locale_internal.h


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


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