This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to disable multiple declarations


On 19 May 2018 at 07:01, sumit kasliwal; wrote:
>> 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

There was a thread about this recently:
https://gcc.gnu.org/ml/gcc/2018-04/msg00110.html

But the short answer is no.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]