#39251: qsort_s has arguments from MSVC, not from C11 standard or GCC Open Date: 2019-05-23 13:08 Last Update: 2019-05-23 20:54 URL for this Ticket: https://osdn.net//projects/mingw/ticket/39251 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39251 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2019-05-23 20:54 Updated by: keith * Status Update from Open to Closed * Resolution Update from None to Won't Fix Comment: The C11 standard introduced a sorting function qsort_s That is in Annex K, which makes it optional; MinGW does not provide it, isn't required to provided it, and isn't likely to do so. Mingw seems to have taken the MSVC function declaration instead of the standard one No, it hasn't; you will not find a declaration for qsort_s() in any genuine MinGW header. (You may find the symbol in a MinGW libmsvcrt.a import library, but ther is no corresponding declaration in any MinGW header file). In any case, since MinGW uses the Microsoft MSVCRT runtime library, if the interface were to be exposed, it would relate to the MSVCRT.DLL implementation, so the MSVC semantics would be correct. Blame Microsoft for adopting their own standards; for MinGW, this is a definite "won't fix". --------------------------------------------------------------------- Ticket Status: Reporter: david-cortes Owner: (None) Type: Issues Status: Closed Priority: 5 - Medium MileStone: (None) Component: (None) Severity: 5 - Medium Resolution: Won't Fix --------------------------------------------------------------------- Ticket details: The C11 standard introduced a sorting function qsort_s, which accepts an extra argument as data that is passed to the sorting function. In GCC and standard C11, the comparison function that is passed to qsort_s has this new data argument as the last argument, while MSVC has it as the first argument. Mingw seems to have taken the MSVC function declaration instead of the standard one. -- Ticket information of MinGW - Minimalist GNU for Windows project MinGW - Minimalist GNU for Windows Project is hosted on OSDN Project URL: https://osdn.net/projects/mingw/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/mingw/ticket/39251 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39251