public inbox for overseers@sourceware.org
 help / color / mirror / Atom feed
From: Brian Dessent <brian@dessent.net>
To: overseers@sourceware.org
Subject: Here's a disclaimer that got through [Fwd: gcc warnings]
Date: Wed, 17 Oct 2007 19:38:00 -0000	[thread overview]
Message-ID: <471664B2.1CAEFB3D@dessent.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 90 bytes --]


Here's more fodder to be added to the disclaimer filter, whenever it's
convenient.

Brian

[-- Attachment #2: Type: message/rfc822, Size: 4686 bytes --]

From: "Humpolicek, Jiri - Acision" <jiri.humpolicek@acision.com>
To: "Tom St Denis" <tstdenis@ellipticsemi.com>
Cc: <gcc-help@gcc.gnu.org>
Subject: RE: gcc warnings
Date: Wed, 17 Oct 2007 15:58:47 +0200
Message-ID: <53248A54C3B3EC4EAAD993D10A6DD01203C5DDA8@cz-ex002.groupinfra.com>

>My recommendation is to simply not assign across types unless you have 
>to.  If you have a function like
>
>void myfunc(unsigned long somevalue)
>{
>}
>
>Then never store somevalue in anything but an unsigned long unless 
>you're sure of what you are doing.  Why would you write
>
>char careless = somevalue;
>
>just for the hell of it? 
>
>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 recipient(s) only. This email contains confidential information. It should not be copied, disclosed to, retained or used by, any party other than the intended recipient. Any unauthorised distribution, dissemination or copying of this E-mail or its attachments, and/or any use of any information contained in them, is strictly prohibited and may be illegal. If you are not an intended 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 send to us may be monitored by systems or persons other than the named communicant for the purposes of ascertaining whether the communication complies with the law and company policies.

             reply	other threads:[~2007-10-17 19:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17 19:38 Brian Dessent [this message]
2007-10-17 20:16 ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=471664B2.1CAEFB3D@dessent.net \
    --to=brian@dessent.net \
    --cc=overseers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).