From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26896 invoked by alias); 16 Jul 2013 21:40:33 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 26881 invoked by uid 89); 16 Jul 2013 21:40:33 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO mail-ie0-f182.google.com) (209.85.223.182) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Jul 2013 21:40:32 +0000 Received: by mail-ie0-f182.google.com with SMTP id s9so2721000iec.13 for ; Tue, 16 Jul 2013 14:40:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=rz5tLfYZ6F3jE5TTodUtvyaLJrPJ88DM5wNvauxdAAU=; b=h2SxjlVSZcwQltaXXjzBJpoHORdJFkJyWxpJI3kYYmG6Ak5LXEONABRv9J+d9dPKwD ou8EuZ90Z3LSwCtYihPr0KnEV70YmMuhU5ncQlvIAWtduS7nPlvvUmL0ZoiOlFO1ppbV ejyy6CvcaLF6jdRWKoDUWR3LHVhaX4GGcXEEU4VUNmndjv5N8mKJvQyp2W6UMFz+KdCf UHt23fXu4s+UvmNbzdeYA2qDwUG6UDqC0KonR969huSqeW41+bpvvns0XRY0KU7+HGBX /s7nYWYFR5nG1K1KcYYqB+gQ5YU8v2wTyU6AFEDhKvi63G8Akk4NC4ZIbfiqIc7lZODX 77fQ== MIME-Version: 1.0 X-Received: by 10.43.73.7 with SMTP id yq7mr3008872icb.76.1374010824882; Tue, 16 Jul 2013 14:40:24 -0700 (PDT) Received: by 10.64.62.67 with HTTP; Tue, 16 Jul 2013 14:40:24 -0700 (PDT) In-Reply-To: <201307162122.r6GLMlMx012078@glazunov.sibelius.xs4all.nl> References: <87wqoqi5yf.fsf@fleche.redhat.com> <201307162122.r6GLMlMx012078@glazunov.sibelius.xs4all.nl> Date: Tue, 16 Jul 2013 21:40:00 -0000 Message-ID: Subject: Re: C99 From: Doug Evans To: Mark Kettenis Cc: Tom Tromey , gdb Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkbISSQSo74iEzLdFZhSFBoFeaGN5NksPokDoVOFTPIJRPzp2FtUcBG+X63ucHdKhUWVt+r6aEcCEnje+1c9oEz/aBmR4Mhp9jxYkW5LaoB7vmh5+Hcavo29WpaMwwfshvDy5oNMTI7MD/M0MAw6z2X2uJh7HZ/7j5OrnBcOfq9EnZ4oOPZen1ujBtMvl2z0LL0jVSK X-SW-Source: 2013-07/txt/msg00051.txt.bz2 On Tue, Jul 16, 2013 at 2:22 PM, Mark Kettenis wrote: >> From: Tom Tromey >> Date: Tue, 16 Jul 2013 14:51:36 -0600 >> >> I'd like to draw attention to this patch: >> >> http://sourceware.org/ml/gdb-patches/2013-06/msg00808.html >> >> This points out that gdb has been unconditionally using a GCC extension, >> apparently since at least 2010; the patch introducing the varargs define >> in tracepoint.c was 7c56ce7 (2010-04-09). >> >> The patch proposes replacing this with the corresponding C99 construct. >> >> So, I'd like to propose we allow the use of C99 in gdb. In particular I >> think we ought to require a C99 preprocessor -- enabling this particular >> patch to go in and also allowing the use of "//" comments. > > Perhaps it is time to move on and start requiring a C99 compiler for GDB. > But "//" comments are offensive to real C programmers! ;) > > Seriously though. This points out that such a switch has some > consequences for our coding standards. We have a fairly consistent > coding style in GDB, which makes it easy for people to move around in > the codebase without getting distracted by the "looks" of the code. I > think it's worth some effort to keep it that way. And allowing "//" > comments isn't going to help. I'd vote for not using them at all. I don't see // as a serious issue, but I can live with it either way. > However, a more important C99 "misfeature" that affects the coding > standard is the possibility to declare varaibles anywhere in the code. > We should not allow this, except for declaring loop variables in a > for() statement. Can you elaborate?