Skip to content

Conversation

@TiborGY
Copy link
Contributor

@TiborGY TiborGY commented Aug 15, 2023

A handful of functions are declared like this: static void __inline .....
Apparently this is a non-standard, obsolete format, as the C standard demands that static, inline and similar must be specified before the return type. If extra warnings are enabled during build, GCC 11 issues this:
warning: ‘__inline’ is not at beginning of declaration [-Wold-style-declaration]

I am not aware that this causes any issues, but it is better to conform to the standard, unless there is reason not to.
This PR switches the placement of inline wherever applicable.

@TiborGY
Copy link
Contributor Author

TiborGY commented Aug 19, 2023

The one test failure is continuous-integration/appveyor/pr getting killed due to the 1 hour time limit. That test is flaky, as it is a matter of luck whether or not it completes in 1 hour.

@martin-frbg
Copy link
Collaborator

yes, may be same issue as sometimes seen in Azure - the CI jobs simply get scheduled on varying generations of hardware

@brada4
Copy link
Contributor

brada4 commented Sep 2, 2023

It is in -Wextra since gcc3. Is it becoming a problem recently?

@TiborGY
Copy link
Contributor Author

TiborGY commented Sep 3, 2023

It is in -Wextra since gcc3. Is it becoming a problem recently?

It is not an immediate problem, but I can see no reason why it should not be fixed. AFAIK the last time this syntax was legal was K&R C, before the C89 standard. Compilers are still accepting it, but this should not be relied upon, unless there is a good reason for it.

Standard violations have a tendency to haunt you after a long period of no problems. The CBLAS hidden argument problems were also a case where violating the standard was OK for a long time, until one day it was not.

@brada4
Copy link
Contributor

brada4 commented Sep 3, 2023

Good job, its really continuous maintenance, like 2-3 nonsensical warning appearing with each new compiler release, like wrong front spacing or double vertical spacing....

@martin-frbg martin-frbg added this to the 0.3.24 milestone Sep 3, 2023
@martin-frbg martin-frbg merged commit 8e6d933 into OpenMathLib:develop Sep 3, 2023
@TiborGY TiborGY deleted the obsolete_inlines branch September 3, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants