From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16863 invoked by alias); 1 Sep 2010 20:51:17 -0000 Received: (qmail 16853 invoked by uid 22791); 1 Sep 2010 20:51:16 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Sep 2010 20:51:11 +0000 Received: (qmail 15834 invoked from network); 1 Sep 2010 20:51:10 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Sep 2010 20:51:10 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.69) (envelope-from ) id 1OquGy-0006ox-Nx; Wed, 01 Sep 2010 20:51:08 +0000 Date: Wed, 01 Sep 2010 21:32:00 -0000 From: "Joseph S. Myers" To: Jan Kratochvil cc: Pedro Alves , gdb-patches@sourceware.org, Joel Brobecker , Eli Zaretskii , Mark Kettenis Subject: Re: [patch 1/9]#2 Rename `enum target_signal' to target_signal_t In-Reply-To: <20100901191843.GA27558@host1.dyn.jankratochvil.net> Message-ID: References: <20100901183952.GE2986@adacore.com> <20100901185112.GC24300@host1.dyn.jankratochvil.net> <201009012007.55983.pedro@codesourcery.com> <20100901191843.GA27558@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00065.txt.bz2 On Wed, 1 Sep 2010, Jan Kratochvil wrote: > enum a is not compatible with enum b in C++; while it is compatible in C. No, enum a is not compatible with enum b in C. They may both be compatible with int, or both be compatible with unsigned int, depending on which is chosen as the underlying type, but type compatibility is not transitive. (enum constants, however, always have type int in C, and you can assign between integer and enum types without needing compatibility, so incompatibility doesn't help detect problem assignments.) -- Joseph S. Myers joseph@codesourcery.com