This is the mail archive of the gcc-patches@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]

Re: Small tweaks for libiberty/cp-demangle.h, libobjc/encoding.c


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


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