public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
@ 2015-01-28  9:14 ubizjak at gmail dot com
  2015-01-28  9:35 ` [Bug libstdc++/64828] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2015-01-28  9:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

            Bug ID: 64828
           Summary: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning:
                    ‘void operator delete [](void*, std::size_t)’ is a
                    usual (non-placement) deallocation function in C++14
                    (or with -fsized-deallocation) [-Wc++14-compat]
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com

The build gained a new warning some time ago:

libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete
[](void*, std::size_t)’ is a usual (non-placement) deallocation function in
C++14 (or with -fsized-deallocation) [-Wc++14-compat]
>From gcc-bugs-return-475197-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 28 09:25:10 2015
Return-Path: <gcc-bugs-return-475197-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26200 invoked by alias); 28 Jan 2015 09:25:09 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 25584 invoked by uid 48); 28 Jan 2015 09:25:01 -0000
From: "thopre01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/62103] Incorrect folding of bitfield in a union on big endian targets
Date: Wed, 28 Jan 2015 09:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: thopre01 at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: thopre01 at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status
Message-ID: <bug-62103-4-dJWw49lITT@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62103-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62103-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg03191.txt.bz2
Content-length: 302

https://gcc.gnu.org/bugzilla/show_bug.cgi?idb103

Thomas Preud'homme <thopre01 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED


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

* [Bug libstdc++/64828] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
  2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
  2015-01-28  9:35 ` [Bug libstdc++/64828] " redi at gcc dot gnu.org
@ 2015-01-28  9:35 ` redi at gcc dot gnu.org
  2015-01-28  9:41 ` [Bug libstdc++/64828] [5 Regression] " redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-28  9:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh, del_opsv.cc ... I changed del_ops.cc and didn't notice a second warning.


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

* [Bug libstdc++/64828] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
  2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
@ 2015-01-28  9:35 ` redi at gcc dot gnu.org
  2015-01-28  9:35 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-28  9:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Wasn't this fixed at r219317 ?


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

* [Bug libstdc++/64828] [5 Regression] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
  2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
  2015-01-28  9:35 ` [Bug libstdc++/64828] " redi at gcc dot gnu.org
  2015-01-28  9:35 ` redi at gcc dot gnu.org
@ 2015-01-28  9:41 ` redi at gcc dot gnu.org
  2015-01-28 12:14 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-28  9:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-01-28
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
   Target Milestone|---                         |5.0
            Summary|libstdc++-v3/libsupc++/del_ |[5 Regression]
                   |opvs.cc:30:1: warning:      |libstdc++-v3/libsupc++/del_
                   |‘void operator delete       |opvs.cc:30:1: warning:
                   |[](void*, std::size_t)’ is  |‘void operator delete
                   |a usual (non-placement)     |[](void*, std::size_t)’ is
                   |deallocation function in    |a usual (non-placement)
                   |C++14 (or with              |deallocation function in
                   |-fsized-deallocation)       |C++14 (or with
                   |[-Wc++14-compat]            |-fsized-deallocation)
                   |                            |[-Wc++14-compat]
     Ever confirmed|0                           |1
>From gcc-bugs-return-475203-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 28 09:42:23 2015
Return-Path: <gcc-bugs-return-475203-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13730 invoked by alias); 28 Jan 2015 09:42:22 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 12126 invoked by uid 48); 28 Jan 2015 09:42:18 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/64828] [5 Regression] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning:=?UTF-8?Q? ‘void operator delete ?=[](void*, std::size_t)=?UTF-8?Q?’ is a usual ?=(non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
Date: Wed, 28 Jan 2015 09:42:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: redi at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-64828-4-TE5Ye5zO7d@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64828-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64828-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg03197.txt.bz2
Content-length: 174

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd828

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Marked as a regression, as this breaks -Werror builds.


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

* [Bug libstdc++/64828] [5 Regression] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
  2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
                   ` (2 preceding siblings ...)
  2015-01-28  9:41 ` [Bug libstdc++/64828] [5 Regression] " redi at gcc dot gnu.org
@ 2015-01-28 12:14 ` ubizjak at gmail dot com
  2015-01-28 15:03 ` redi at gcc dot gnu.org
  2015-01-28 15:06 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2015-01-28 12:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
BTW: These warnings also appear in libsanitizer:

/home/uros/gcc-svn/trunk/libsanitizer/asan/asan_new_delete.cc:107:6: warning:
‘void operator delete(void*, size_t)’ is a usual (non-placement) deallocation
function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
/home/uros/gcc-svn/trunk/libsanitizer/asan/asan_new_delete.cc:112:6: warning:
‘void operator delete [](void*, size_t)’ is a usual (non-placement)
deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
/home/uros/gcc-svn/trunk/libsanitizer/asan/asan_new_delete.cc:107:6: warning:
‘void operator delete(void*, size_t)’ is a usual (non-placement) deallocation
function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
/home/uros/gcc-svn/trunk/libsanitizer/asan/asan_new_delete.cc:112:6: warning:
‘void operator delete [](void*, size_t)’ is a usual (non-placement)
deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
>From gcc-bugs-return-475228-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 28 12:19:25 2015
Return-Path: <gcc-bugs-return-475228-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8284 invoked by alias); 28 Jan 2015 12:19:24 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8123 invoked by uid 48); 28 Jan 2015 12:19:17 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64830] g++ generating segfaulting binaries
Date: Wed, 28 Jan 2015 12:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-64830-4-MJhJJHMqY9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64830-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64830-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg03222.txt.bz2
Content-length: 1712

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd830

Jonathan Wakely <redi at gcc dot gnu.org> changed:

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not a bug in GCC.

tl;dr https://isocpp.org/wiki/faq/ctors#static-init-order


The segfault is due to dereferencing default_instance_ here:

inline const ::BundleConfigInfo& ConfigInfo::bundle() const {
  return bundle_ != NULL ? *bundle_ : *default_instance_->bundle_;
}

That is supposed to be initialized by protobuf_AddDesc_testcase_2eproto() which
gets called from:

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_testcase_2eproto {
  StaticDescriptorInitializer_testcase_2eproto() {
    protobuf_AddDesc_testcase_2eproto();
  }
} static_descriptor_initializer_testcase_2eproto_;

Which is a global object in testcase.pb.cc

Your testcase.cc also has a global object:

namespace ConfigHelper
{
    Config defaultConfig; // causes segfault
}

The order of initialization of globals is undefined in separate translation
units, so you are wrong to assume that the protobuf global will be initialized
before your global.

I was able to avoid the segfault by simply reordering the files passed to the
linker, so that testcase.pb.o comes before testcase.o, but that is still
relying on something that is not guaranteed.

Either protobuf should find a better way to initialize its defaults or you
should not use it from globals.


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

* [Bug libstdc++/64828] [5 Regression] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
  2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
                   ` (3 preceding siblings ...)
  2015-01-28 12:14 ` ubizjak at gmail dot com
@ 2015-01-28 15:03 ` redi at gcc dot gnu.org
  2015-01-28 15:06 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-28 15:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Jan 28 15:02:28 2015
New Revision: 220207

URL: https://gcc.gnu.org/viewcvs?rev=220207&root=gcc&view=rev
Log:
    PR libstdc++/64828
    * libsupc++/Makefile.am: Compile del_opvs.cc as C++14.
    * libsupc++/Makefile.in: Regenerate.
    * src/c++11/Makefile.in: Regenerate.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/libsupc++/Makefile.am
    trunk/libstdc++-v3/libsupc++/Makefile.in
    trunk/libstdc++-v3/src/c++11/Makefile.in


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

* [Bug libstdc++/64828] [5 Regression] libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat]
  2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
                   ` (4 preceding siblings ...)
  2015-01-28 15:03 ` redi at gcc dot gnu.org
@ 2015-01-28 15:06 ` redi at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-28 15:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64828

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
But not in libstdc++ any longer. Please re-open and change the component if you
want it fixed in libsanitizer, otherwise I'm closing this as fixed.


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

end of thread, other threads:[~2015-01-28 15:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28  9:14 [Bug libstdc++/64828] New: libstdc++-v3/libsupc++/del_opvs.cc:30:1: warning: ‘void operator delete [](void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation) [-Wc++14-compat] ubizjak at gmail dot com
2015-01-28  9:35 ` [Bug libstdc++/64828] " redi at gcc dot gnu.org
2015-01-28  9:35 ` redi at gcc dot gnu.org
2015-01-28  9:41 ` [Bug libstdc++/64828] [5 Regression] " redi at gcc dot gnu.org
2015-01-28 12:14 ` ubizjak at gmail dot com
2015-01-28 15:03 ` redi at gcc dot gnu.org
2015-01-28 15:06 ` redi at gcc dot gnu.org

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).