From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3167 invoked by alias); 17 Oct 2007 19:38:32 -0000 Received: (qmail 3147 invoked by uid 22791); 17 Oct 2007 19:38:31 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 Oct 2007 19:38:29 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1IiEio-00080f-UT for overseers@sourceware.org; Wed, 17 Oct 2007 19:38:27 +0000 Message-ID: <471664B2.1CAEFB3D@dessent.net> Date: Wed, 17 Oct 2007 19:38:00 -0000 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: overseers@sourceware.org Subject: Here's a disclaimer that got through [Fwd: gcc warnings] Content-Type: multipart/mixed; boundary="------------DB0A10B6E19666E8745C9F31" Mailing-List: contact overseers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: overseers-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00021.txt.bz2 This is a multi-part message in MIME format. --------------DB0A10B6E19666E8745C9F31 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 90 Here's more fodder to be added to the disclaimer filter, whenever it's convenient. Brian --------------DB0A10B6E19666E8745C9F31 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 4665 Return-path: Envelope-to: brian@dessent.net Delivery-date: Wed, 17 Oct 2007 14:03:25 +0000 Received: from sourceware.org ([209.132.176.174]) by dessent.net with smtp (Exim 4.50) id 1Ii9UU-0006u0-DP for brian@dessent.net; Wed, 17 Oct 2007 14:03:25 +0000 Received: (qmail 25923 invoked by alias); 17 Oct 2007 14:03:14 -0000 Received: (qmail 25912 invoked by uid 22791); 17 Oct 2007 14:03:12 -0000 X-Spam-Check-By: sourceware.org Received: from cluster-a.mailcontrol.com (HELO cluster-a.mailcontrol.com) (80.69.8.190) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 Oct 2007 14:03:03 +0000 Received: from rly34a.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly34a.srv.mailcontrol.com (MailControl) with ESMTP id l9HE2ujs011906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Oct 2007 15:02:56 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly34a.srv.mailcontrol.com (MailControl) id l9HE20BP009350 for gcc-help@gcc.gnu.org; Wed, 17 Oct 2007 15:02:00 +0100 Received: from c2-ex002.groupinfra.com ([212.123.206.142]) by rly34a-eth0.srv.mailcontrol.com (envelope-sender jiri.humpolicek@acision.com) (MIMEDefang) with ESMTP id l9HE1Psp007382; Wed, 17 Oct 2007 15:01:59 +0100 (BST) Received: from cz-ex001.groupinfra.com ([158.234.170.116]) by c2-ex002.groupinfra.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 17 Oct 2007 15:58:48 +0200 Received: from cz-ex002.groupinfra.com ([158.234.170.118]) by cz-ex001.groupinfra.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 17 Oct 2007 15:58:47 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: gcc warnings Date: Wed, 17 Oct 2007 15:58:47 +0200 Message-ID: <53248A54C3B3EC4EAAD993D10A6DD01203C5DDA8@cz-ex002.groupinfra.com> References: <53248A54C3B3EC4EAAD993D10A6DD01203C5DAB7@cz-ex002.groupinfra.com> <4715F65A.20106@ellipticsemi.com> From: "Humpolicek, Jiri - Acision" To: "Tom St Denis" Cc: Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Delivered-To: mailing list gcc-help@gcc.gnu.org X-dessent.net-Spam-Report: -8.6/5.0 ---- Start SpamAssassin results * -6.0 USER_IN_WHITELIST_TO User is listed in 'whitelist_to' * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] ---- End SpamAssassin results X-dessent.net-Spam-Flag: NO X-Mozilla-Status2: 00000000 Content-length: 1725 >My recommendation is to simply not assign across types unless you have=20 >to. If you have a function like > >void myfunc(unsigned long somevalue) >{ >} > >Then never store somevalue in anything but an unsigned long unless=20 >you're sure of what you are doing. Why would you write > >char careless =3D somevalue; > >just for the hell of it?=20 > >Tom I fully understand with you Tom. I don't want to write this 'correct' code, but problem is that it is easy to make this constructs inadvertently. And IMHO this is place for compiler to report warning 'Here you overlook something'. Because there is no reason do these things I think that warning is good solution. And if someone want to use these language properties without warning, it may be possible to use explicit cast to smaller type to suppress warning (that is correct because there is evidence that user knows about his doing). Thanks, Jiri Humpolicek This e-mail and any attachment is for authorised use by the intended recipi= ent(s) only. This email contains confidential information. It should not be= copied, disclosed to, retained or used by, any party other than the intend= ed recipient. Any unauthorised distribution, dissemination or copying of th= is E-mail or its attachments, and/or any use of any information contained i= n them, is strictly prohibited and may be illegal. If you are not an intend= ed recipient then please promptly delete this e-mail and any attachment and= all copies and inform the sender directly via email. Any emails that you s= end to us may be monitored by systems or persons other than the named commu= nicant for the purposes of ascertaining whether the communication complies = with the law and company policies. --------------DB0A10B6E19666E8745C9F31--