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

Reply via email to