From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262723AbVGHRRM (ORCPT ); Fri, 8 Jul 2005 13:17:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262721AbVGHRRM (ORCPT ); Fri, 8 Jul 2005 13:17:12 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:37519 "EHLO e3.ny.us.ibm.com") by vger.kernel.org with ESMTP id S262718AbVGHRRK (ORCPT ); Fri, 8 Jul 2005 13:17:10 -0400 In-Reply-To: To: Roman Zippel Cc: Andrew Morton , bfields@fieldses.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linuxram@us.ibm.com, mike@waychison.com, Miklos Szeredi , Pekka J Enberg , Alexander Viro MIME-Version: 1.0 Subject: Re: share/private/slave a subtree - define vs enum X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 Message-ID: From: Bryan Henderson Date: Fri, 8 Jul 2005 10:16:10 -0700 X-MIMETrack: Serialize by Router on D01ML604/01/M/IBM(Build V70_06092005|June 09, 2005) at 07/08/2005 13:17:06, Serialize complete at 07/08/2005 13:17:06 Content-Type: text/plain; charset="US-ASCII" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org >If it's really enumerated data types, that's fine, but this example was >about bitfield masks. Ah. In that case, enum is a pretty tortured way to declare it, though it does have the practical advantages over define that have been mentioned because the syntax is more rigorous. The proper way to do bitfield masks is usually C bit field declarations, but I understand that tradition works even more strongly against using those than against using enum to declare enumerated types. >there is _nothing_ wrong with using defines for constants. I disagree with that; I find practical and, more importantly, philosophical reasons not to use defines for constants. I'm sure you've heard the arguments; I just didn't want to let that statement go uncontested.