This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to disable multiple declarations
- From: "sumit kasliwal; via gcc" <gcc at gcc dot gnu dot org>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sat, 19 May 2018 06:01:14 +0000 (UTC)
- Subject: Re: How to disable multiple declarations
- References: <690331560.3047642.1526709674214.ref@mail.yahoo.com>
- Reply-to: "sumit kasliwal;" <sumitkasliwalin at yahoo dot com>
- Reply-to: "sumit kasliwal;" <sumitkasliwalin at yahoo dot com>
> Hi,
>
> As a visiting faculty member at a local college, I am preparing
> documentation for some students that details bad practices to
> avoid when programming with C.
>
> One of the practices I admonish against is multiple declarations
> in a single statement. While my doc does whatever little is
> possible at the documentation level, I was also looking for a way
> for being able to disable multiple declarations in the Makefile
> itself.
>
> Is there some way I can get the gcc compiler to throw an error
> at compile time if it spots multiple declarations being made
> in a single C statement ? The error mechanism must be specific
> to multiple-declarations.
>
> Thanks for any help