From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,af40e09e753872c X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,30e368bdb3310fe5 X-Google-Attributes: gid103376,public X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public X-Google-Thread: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,public X-Google-Thread: 109fba,f292779560fb8442 X-Google-Attributes: gid109fba,public X-Google-Thread: 1008e3,30e368bdb3310fe5 X-Google-Attributes: gid1008e3,public From: kingdon@harvey.cyclic.com (Jim Kingdon) Subject: Re: Hungarian notation Date: 1996/06/01 Message-ID: #1/1 X-Deja-AN: 157976586 sender: kingdon@harvey.cyclic.com references: <4adem2$b5s@mercury.IntNet.net> <4ahka7$o9m@inrou.erno.de> organization: very little newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel Date: 1996-06-01T00:00:00+00:00 List-Id: > In particular, gcc checks the arguments of the printf family against the > formatter string when the -Wall option is on (actually, I'm sure it's a > specific warning, but I always use -Wall). > > It only warns with these specific functions; if you declare your own > function that uses varargs and vsprintf, it won't check it. Yes, it's a > hack, but it's a really _nice_ hack. I probably shouldn't respond to a message which is this widely cross-posted, but this is incorrect. If you insert the correct __attribute__ declarations, gcc -Wall will check a user-defined function too (I know, this just caught a bug in CVS within the last week or two).