[PyQt] [PATCH 0/5] Fix several warnings when using current GCC

Stefan Brüns stefan.bruens at rwth-aachen.de
Sat Sep 29 15:27:44 BST 2018


GCC 8 throws a warning whenever 0/NULL is used for a null pointer
constant. It also suggests to mark any overridden virtual function
as "override". Third, casting of function pointers of apparently
incompatible type has to be more explicit.

The first patch introduces some helper macros to allow use of
the same identifier in the geneated code regardless if the code
is compiled with a C compiler or as C++ in C++03 or C++11 mode.

The following 4 patches contain the actual fixes for the code
generator.

Compilation has been tested with GCC7 and GCC8. Care has been taken
to generate correct code also for e.g MSVC, although this is
untested.

Stefan Brüns (5):
  Add SIP_NULLPTR/SIP_OVERRIDE compatibility macros
  Use SIP_NULLPTR for null pointer constants
  Use SIP_NULLPTR if return value is a pointer to an object
  Fix GCC cast-function-type warning
  Fix GCC suggest-override warning

 sipgen/gencode.c | 255 ++++++++++++++++++++++++++---------------------
 1 file changed, 142 insertions(+), 113 deletions(-)

-- 
2.19.0



More information about the PyQt mailing list