On 13/12/2019 22:39, Sylvain Rochet wrote:
> Hi,
> 
> On Thu, Dec 12, 2019 at 10:04:19AM -0700, mav wrote:
>> Hi, everybody. Maybe this is some type conversion issue, because vj.c throws
>> many type conversion warnings, if latter enabled. As Sylvain recommends I
>> would disable VJ for my project for good! Thank you for your answers. 
> 
> I also asked why do you need VJ in order to decide whether I should bury 
> it in non-working features or to try to fix it once for all. So, I'm 
> asking it again:
> 
> Why do you need VJ for ? It is useless with cellular modems, it is
> useless in PPPoE and PPPoL2TP, AFAIK the last user was dial-up modems,
> are they still used in the wild ?
> 

If you suspect type aliasing problems, then you might add this quick and
dirty workaround to the top of the relevant C files:

#ifdef __GNUC__
#pragma GCC optimize "-fno-strict-aliasing"
#endif


Obviously the ideal answer is to fix the code, but that might not be
practical or worth the effort.  This kind of forced compiler option is a
reasonable compromise, because it makes the code safe regardless of the
compiler options picked by the programmer and the build system
(assuming, of course, you have #ifdef's covering the relevant compilers).

You can even do:

#ifdef __GNUC__
#pragma GCC optimize "-O1"
#endif

to avoid -O2 optimisations.


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to