This is the mail archive of the gcc@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: IMA corner case with forward declarations of statics


Alexandre Oliva <aoliva@redhat.com> writes:

> On Jun 24, 2004, Zack Weinberg <zack@codesourcery.com> wrote:
>
>> ... so I find nothing here to support the claim that the program is
>> valid.  I've now gone over to Geoff's opinion that it isn't, and
>> am proceeding on that theory.
>
> I don't think you can refuse to compile the code by issuing an error,
> though.  I'm thinking of DRs 132 and 109.

This is compile-time undefined behavior, which *is* allowed to refuse
to compile.  Note that the undefinedness is predicated on the mere
appearance of two declarations of the same object with clashing
linkage specifications; not whether that object is used at runtime.

zw


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