------- Comment #3 from rguenth at gcc dot gnu dot org  2006-02-21 10:14 -------
So you want

typedef struct {
  int bar;
  void *foobar
#if !NEEDED_BY_ARCH
  __attribute__((readas(0)))
#endif
  ;
} Foo;

so Foo.foobar is NULL for !NEEDED_BY_ARCH?  Why not do the proper thing
and provide accessors like f.i. int the LK:

#define foo_foo(x) (x).bar
#if !NEEDED_BY_ARCH
#define foo_foobar(x) NULL
#else
#define foo_foobar(x) (x).foobar
#endif

no need to invent funny attributes for this.  And #defines are properly
localized in some header.  OO makes you happy.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to