This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/59850] New: Support sparse-style pointer address spaces (type attributes)


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

            Bug ID: 59850
           Summary: Support sparse-style pointer address spaces (type
                    attributes)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hpa at zytor dot com

The sparse C compile checker has a set of extensions to the gcc type attribute
set:

__attribute__((noderef))

__attribute__((address_space(N)))

... where N is an arbitrary integer.

sparse will warn if pointers tagged with different address spaces are mixed,
and if a pointer tagged with "noderef" is dereferenced.

It would be highly useful if these protections could be extended to gcc itself
and thus get more ubiquitously run.  The main use case, of course, is the Linux
kernel, but almost any low-level application which has to deal with multiple
"manually maintained" address spaces is likely to benefit.

__attribute__((force))

... usually used as part of a cast, is used to suppress the warning.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]