Date: Tue, 7 Nov 2000 21:23:59 -0500 (EST) From: "Albert D. Cahalan" <acahalan@cs.uml.edu> To: hackers@FreeBSD.ORG, roam@orbitel.bg, keramida@ceid.upatras.gr Subject: Re: umask(2) and -Wconversion Message-ID: <200011080223.eA82Nxf392522@saturn.cs.uml.edu>
next in thread | raw e-mail | index | archive | help
Peter Pentchev writes: > As you can see, I'm passing a short i as a first arg, a short f > as second, and a short b as third; and yet, gcc with BDECFLAGS > complains about ALL the arguments! Yes, no kidding. That's what you asked gcc to do. `-Wconversion' Warn if a prototype causes a type conversion that is different from what would happen to the same argument in the absence of a prototype. This includes conversions of fixed point to floating and vice versa, and conversions changing the width or signedness of a fixed point argument except when the same as the default promotion. The C language is crufty. In the absense of a prototype, "short" is promoted to "int". You wanted to be warned about that; you got it! To avoid the warning, avoid passing anything but "int" and "double". Maybe "long" is OK too, I forget. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011080223.eA82Nxf392522>