On Thu, 2022-11-17 at 08:02 +0000, Magnus Armholt via Linuxptp-devel
wrote:
> Nothing to complain about the patch, thanks for looking after the
> code base!
> 
> > LinuxPTP source still prefers to keep with the GNU C89 convention
> > of
> > variables being at the top of the function. Newer versions of GCC
> > have
> > begun defaulting to a newer C standard, which explains how these
> > slipped in.
> > Note that directly enforcing "-std=c89" does not work because we
> > rely on
> > some GNU extensions of C89.
> 
> Has there been any discussion about this topic? If it is hard to
> verify the code, then these
> mistakes will keep on slipping in. Is there a script or ReadMe
> somewhere, listing the needed
> compiler flags to be used in order to use the "correct" C89?
> 
> C89 is now > 30y old, any plans when to move to a more modern
> version?

It is the standard, not the compiler.
As it may, that I might prefer differently.

It does make sense to use old standard with new compilers.
New compilers and new libc support old standards.
No reason to update standard for them.
The standard is more for developers convenient.
And in case we want to use new functionality added in new standard.

> 
> Linux is from time to time dropping support for old things, 

Linux uses and relys on GNU extensions.
As much as I appropriate Linux and Linus, their approach is not the
holly grill.
Richard may differ.

I do not object to use a newer standard or stay with the old one,
 as long as we are coherent.

> so although being a project that try to support as many devices as
> possible, it is possible

As the newest compilers support old standard.
And new compilers can compile to very old devices.
I do not see any connection between old devices and old standard.
They are not a reason to select standard.

As long as you can update linuxptp, you can probably update the libc.
If you can't, than no reason to update linuxptp either.

> to move to more modern versions, if it is announced in time and in
> accordance with a plan.


> 
> BR,
> Magnus Armholt
> 
> 
> 
> 
> 
> _______________________________________________
> Linuxptp-devel mailing list
> Linuxptp-devel@lists.sourceforge.net
>    
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Flinuxptp-devel&data=05%7C01%7Cerez.geva.ext%40siemens.com%7C8b9983f7486248beb86308dac8771ed9%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638042711193699884%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Kq2Tj%2FHyfp5x5fj8qFsLcuoUozMtBY9ZiLS%2FtT9mnv0%3D&reserved=0


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to