From owner-cvs-all Mon Aug 24 13:12:37 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA28567 for cvs-all-outgoing; Mon, 24 Aug 1998 13:12:37 -0700 (PDT) (envelope-from owner-cvs-all) Received: from cons.org (knight.cons.org [194.233.237.86]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA28562; Mon, 24 Aug 1998 13:12:24 -0700 (PDT) (envelope-from cracauer@cons.org) Received: (from cracauer@localhost) by cons.org (8.8.8/8.7.3) id WAA04162; Mon, 24 Aug 1998 22:11:31 +0200 (CEST) Message-ID: <19980824221131.A4135@cons.org> Date: Mon, 24 Aug 1998 22:11:31 +0200 From: Martin Cracauer To: Gary Palmer , Martin Cracauer Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/bin/sh arith.y arith_lex.l error.c error.h jobs.c jobs.h miscbltin.c trap.c trap.h References: <199808241020.DAA21352@freefall.freebsd.org> <21305.903974922@gjp.erols.com> <19980824212429.A3758@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <19980824212429.A3758@cons.org>; from Martin Cracauer on Mon, Aug 24, 1998 at 09:24:29PM +0200 Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I wrote: > And a variable is allowed to be declared volatile in one source file > and not volatile in another, hence it is not a conflict to have an > extern declaration without it and then a definition with volatile > within the same scope. Ops, here my own assumptions ruled over the facts. ANSI says: 6.5: "All declarations in the same scope that refer to the same object or function shall specify compatible types" 6.5.3 "For two qualified types to be compatible, both shall have the identically qualified version of a compatible type: ..." The following code is illegal, although it passes FreeBSD' gcc at -Wall. Still my question, what compiler did you use? > This program compiles fine with -Wall under FreeBSD's default gcc: > > #include > extern volatile sig_atomic_t bla; > int bla; > int main(void) > { > exit(0); > } Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536 Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany