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 libgomp/50386] [4.7 Regression] libgomp.h:87:5: error: unnamed struct/union that defines no instances


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

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-09-20 22:32:49 UTC ---
I think this is a bootstrap issue rather than a problem with libgomp . A
reduced testcase of this form fails with the stage2 compiler but is ok with the
stage1 compiler. 


struct gomp_work_share
{
  /* This member records the SCHEDULE clause to be used for this construct.
     The user specification of "runtime" will already have been resolved.
     If this is a SECTIONS construct, this value will always be DYNAMIC.  */
  union {
    struct {
      /* This is the chunk_size argument to the SCHEDULE clause.  */
      long chunk_size;

      /* This is the iteration end point.  If this is a SECTIONS construct,
         this is the number of contained sections.  */
      long end;

      /* This is the iteration step.  If this is a SECTIONS construct, this
         is always 1.  */
      long incr;
    }u;

  };
}a;

Where the stage2 compiler goes : 

/home/40000/t1.i:21:3: warning: unnamed struct/union that defines no instances
[enabled by default]


and the stage1 compiler goes quietly. 

Could you check if you see similar behaviour ? 

Ramana


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