This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Small tweaks for libiberty/cp-demangle.h, libobjc/encoding.c
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, DJ Delorie <dj at redhat dot com>, Ziemowit Laski <zlaski at ziemas dot net>
- Date: 28 Jun 2004 11:49:58 -0400
- Subject: Re: Small tweaks for libiberty/cp-demangle.h, libobjc/encoding.c
- References: <87acyq6udu.fsf@taltos.codesourcery.com>
Zack Weinberg <zack@codesourcery.com> writes:
> While working on IMA I found two places where code falls foul of the
> rule in C99 6.2.2p7: the same object is declared first 'extern' and
> then 'static', which provokes compile-time undefined behavior. This
> rule has been discussed in the general case in the thread starting at
> <http://gcc.gnu.org/ml/gcc/2004-06/msg01443.html> -- the consensus
> there is in favor of making this an error. The IMA patches are not
> yet complete, so I would like to submit these changes separately; they
> should have no effect other than avoiding this future problem.
>
> Ok for mainline?
>
> zw
>
> libiberty:
> * cp-demangle.h: Declare cplus_demangle_operators,
> cplus_demangle_builtin_types, cplus_demangle_mangled_name, and
> cplus_demangle_type as static if IN_GLIBCPP_V3.
> libobjc:
> * encoding.c: Rename target_flags with a #define to avoid
> conflict with a prior declaration.
The libiberty bits are fine.
Ian