public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59851] New: Support sparse-style __attribute__((nocast)) (type attribute)
@ 2014-01-17  5:22 hpa at zytor dot com
  2014-01-17  5:22 ` [Bug c/59851] " hpa at zytor dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hpa at zytor dot com @ 2014-01-17  5:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59851

            Bug ID: 59851
           Summary: Support sparse-style __attribute__((nocast)) (type
                    attribute)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hpa at zytor dot com

Created attachment 31862
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31862&action=edit
Example source file

The sparse static C language checker has a type attribute

__attribute__((nocast))

... which issues a warning if a type is implicitly converted unless it is
exactly the same type (changes in constness is permitted, presumably changes in
volatility *should* be permitted as well).

The attached example file produces:

nocast.c:11:24: warning: implicit cast to nocast type
nocast.c:23:24: warning: implicit cast to nocast type


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/59851] Support sparse-style __attribute__((nocast)) (type attribute)
  2014-01-17  5:22 [Bug c/59851] New: Support sparse-style __attribute__((nocast)) (type attribute) hpa at zytor dot com
@ 2014-01-17  5:22 ` hpa at zytor dot com
  0 siblings, 0 replies; 2+ messages in thread
From: hpa at zytor dot com @ 2014-01-17  5:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59851

H. Peter Anvin <hpa at zytor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-17  5:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17  5:22 [Bug c/59851] New: Support sparse-style __attribute__((nocast)) (type attribute) hpa at zytor dot com
2014-01-17  5:22 ` [Bug c/59851] " hpa at zytor dot com

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).