[Bug 206513] x11/lumina: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jan 23 03:58:32 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206513

            Bug ID: 206513
           Summary: x11/lumina: 'delete' applied to a pointer that was
                    allocated with 'new[]'; did you mean 'delete[]'?
           Product: Ports & Packages
           Version: Latest
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: kmoore at FreeBSD.org
          Reporter: markmi at dsl-only.net
             Flags: maintainer-feedback?(kmoore at FreeBSD.org)
          Assignee: kmoore at FreeBSD.org

When I did a "portmaster -iDK x11/lumina" it reported use of a delete not
matched to the pointer variable's new[]. For modern environments (such as
11.0-CURRENT libc++ based) this is likely to not work as I understand things.
(Might there be older libraries that did not support delete[]?)

/usr/bin/clang++ -target armv6--freebsd11.0-gnueabi -march=armv7-a
-mcpu=cortex-a7 -mfloat-abi=softfp -mno-unaligned-access -c -pipe
-mfloat-abi=softfp -g -fno-strict-aliasing -Wall -W -pthread -D_THREAD_SAFE
-fPIC -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB
-DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/local/include
-I/usr/local/include/qt5 -I/usr/local/include/qt5/QtWidgets
-I/usr/local/include/qt5/QtX11Extras -I/usr/local/include/qt5/QtMultimedia
-I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtNetwork
-I/usr/local/include/qt5/QtCore -I. -I/usr/local/include -I/usr/local/include
-I/usr/local/lib/qt5/mkspecs/freebsd-clang -o LuminaX11.o LuminaX11.cpp
LuminaX11.cpp:137:3: warning: 'delete' applied to a pointer that was allocated
with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
  delete list;
  ^
        []
LuminaX11.cpp:130:24: note: allocated with 'new[]' here
  xcb_window_t *list = new xcb_window_t[ roots.length() ];
                       ^
1 warning generated.

The build generated no other complaints.

(I happen to be experimenting with projects/clang380-import use targeting a
Raspberry Pi 2B. The arm7-a and cortex-a7 are part of that and FreeBSD requires
aligned accesses for such a context. That explains some of the extracted
clang++ command material and indicate the vintage of C++ environment for the
specific example context. -r294179 of projects/clang380-import was in use for
this note.)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list