Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 1998 21:24:29 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Gary Palmer <gpalmer@FreeBSD.ORG>, Martin Cracauer <cracauer@FreeBSD.ORG>
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
Message-ID:  <19980824212429.A3758@cons.org>
In-Reply-To: <21305.903974922@gjp.erols.com>; from Gary Palmer on Mon, Aug 24, 1998 at 12:08:42PM -0400
References:  <199808241020.DAA21352@freefall.freebsd.org> <21305.903974922@gjp.erols.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In <21305.903974922@gjp.erols.com>, Gary Palmer wrote: 
> Martin Cracauer wrote in message ID
> <199808241020.DAA21352@freefall.freebsd.org>:
> > cracauer    1998/08/24 03:20:37 PDT
> > 
> >   Modified files:
> >     bin/sh               arith.y arith_lex.l error.c error.h 
> >                          jobs.c jobs.h miscbltin.c trap.c trap.h 
> 
> Please fix your commit....
> 
> /usr/src/bin/sh/error.c:66: conflicting types for `exception'
> /usr/src/bin/sh/error.h:67: previous declaration of `exception'
> /usr/src/bin/sh/error.c:67: conflicting types for `suppressint'
> /usr/src/bin/sh/error.h:83: previous declaration of `suppressint'
> 
> This *cannot* have passed a compile test as-is.

I got two "volatile sig_atomic_t" and "int" mixed up. Corrected fix
commited.

As for not testing, it compiles fine on my box and it should (although
it is of course non useful).

sig_atomic_t is typedef'ed to int on both -current and -stable, hence
no conflict here.

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.

This program compiles fine with -Wall under FreeBSD's default gcc:

#include <signal.h>
extern volatile sig_atomic_t bla;
int bla;
int main(void)
{
	exit(0);
}

What compiler did you use?

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer
  Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536
  Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980824212429.A3758>