public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51413] New: Broken diagnostic with __builtin_offsetof
@ 2011-12-04 21:57 reichelt at gcc dot gnu.org
  2011-12-22 14:11 ` [Bug c++/51413] " paolo.carlini at oracle dot com
  2013-06-14 22:50 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-04 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51413
           Summary: Broken diagnostic with __builtin_offsetof
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


A broken diagnostic is generated for the following invalid code snippet since
GCC 4.1.2:

=============================================
struct A
{
  static void foo();
};

int i = __builtin_offsetof(A, foo[1][1]);
=============================================

bug.cc:6:36: warning: pointer to a function used in arithmetic
[-Wpointer-arith]
bug.cc:6:39: warning: pointer to a function used in arithmetic
[-Wpointer-arith]
bug.cc:6:40: error: cannot apply 'offsetof' to member function '#'indirect_ref'
not supported by dump_decl#<declaration error>'


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

* [Bug c++/51413] Broken diagnostic with __builtin_offsetof
  2011-12-04 21:57 [Bug c++/51413] New: Broken diagnostic with __builtin_offsetof reichelt at gcc dot gnu.org
@ 2011-12-22 14:11 ` paolo.carlini at oracle dot com
  2013-06-14 22:50 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-22 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-12-22
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-22 13:43:34 UTC ---
On it.


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

* [Bug c++/51413] Broken diagnostic with __builtin_offsetof
  2011-12-04 21:57 [Bug c++/51413] New: Broken diagnostic with __builtin_offsetof reichelt at gcc dot gnu.org
  2011-12-22 14:11 ` [Bug c++/51413] " paolo.carlini at oracle dot com
@ 2013-06-14 22:50 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-14 22:50 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.


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

end of thread, other threads:[~2013-06-14 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-04 21:57 [Bug c++/51413] New: Broken diagnostic with __builtin_offsetof reichelt at gcc dot gnu.org
2011-12-22 14:11 ` [Bug c++/51413] " paolo.carlini at oracle dot com
2013-06-14 22:50 ` paolo.carlini at oracle 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).