lapack/laed3: fix MinGW build by matching LAMC3 prototype#5744
Open
nakatamaho wants to merge 1 commit intoOpenMathLib:developfrom
Open
lapack/laed3: fix MinGW build by matching LAMC3 prototype#5744nakatamaho wants to merge 1 commit intoOpenMathLib:developfrom
nakatamaho wants to merge 1 commit intoOpenMathLib:developfrom
Conversation
common_interface.h declares slamc3 as returning FLOATRET when NEED_F2CCONV is enabled, but laed3_single.c and laed3_parallel.c redeclared LAMC3 as returning FLOAT. This causes conflicting-type errors in MinGW builds. Use FLOATRET for the local LAMC3 prototype so it matches the shared declaration. Also undefine the Windows max macro before the local max definition in laed3_parallel.c to avoid macro redefinition warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a MinGW build failure in
lapack/laed3.common_interface.hdeclaresslamc3with return typeFLOATRET(when
NEED_F2CCONVis active), butlaed3_single.candlaed3_parallel.credeclareLAMC3as returningFLOAT.This leads to conflicting-type errors such as:
Fix
change the local LAMC3 prototype in:
lapack/laed3/laed3_single.c
lapack/laed3/laed3_parallel.c
from FLOAT to FLOATRET so it matches the shared declaration in
common_interface.h
Additionally, this PR undefines the Windows max macro before the local
max macro definition in laed3_parallel.c to avoid macro redefinition
warnings during MinGW/Windows builds.
Why this is correct
The shared interface already defines the ABI-visible declaration for
slamc3. The local declarations in the two laed3 translation units
should match that interface exactly. Using FLOATRET restores that
consistency and removes the MinGW conflicting-type failure.
The max change does not alter behavior; it only avoids a warning caused
by windows.h / minwindef.h defining max as a macro.
Notes
I have verified that this change addresses the MinGW compile failure
reported in slaed3_single.obj / slaed3_parallel.obj.
I have not changed the surrounding logic or numerical code paths.
This PR is intentionally minimal and limited to fixing the declaration
mismatch and the Windows macro warning.