Re: [sr-dev] [kamailio/kamailio] app_python warning about strict-aliasing (#1249)

2020-03-12 Thread Daniel-Constantin Mierla
app_python3 was added meanwhile for python3 support, which seemed to be the 
reason of this aged issue.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1249#issuecomment-598117280___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] app_python warning about strict-aliasing (#1249)

2020-03-12 Thread Daniel-Constantin Mierla
Closed #1249.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1249#event-3122272741___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] app_python warning about strict-aliasing (#1249)

2017-09-27 Thread Daniel-Constantin Mierla
Tracking here the issue exposed by @linuxmaniac via PR #924, as it was merged 
and then reverted (by #1248), so anyone can be aware of as well as 
comment/propose solutions for it.

>Add "-fno-strict-aliasing" to compilation flags
>
>Fixes a slew of:
>  "dereferencing type-punned pointer will break strict-aliasing rules"
>warnings from GCC for lines of the form:
>  Py_INCREF(Py_True);
>and
>  Py_INCREF(Py_False);
>
>due to the cast from PyIntObject* to PyObject*
>
>GCC is technically correct here; see:
>  http://www.python.org/dev/peps/pep-3123/
>though this is unlikely to lead to non-working machine code.

The initial proposed patch for `src/modules/app_python/Makefile` is:

```

 @@ -22,6 +22,8 @@ ifeq ($(OS), freebsd)
  LIBS+=-pthread
  endif
  
 +# python2 https://www.python.org/dev/peps/pep-3123/
 +DEFS+=-fno-strict-aliasing
  DEFS+=-I${PYTHON_INCDIR}
  DEFS+=-DKAMAILIO_MOD_INTERFACE
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1249___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev