config: Add tests for _Float80 and _Float128

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2021-02-07 07:01:55 +01:00
parent a4c6a19e45
commit f2b321a4be
2 changed files with 88 additions and 0 deletions

44
config/check_float128.c Normal file
View File

@ -0,0 +1,44 @@
// *****************************************************************************
// check_float128.c make-it-quick project
// *****************************************************************************
//
// File description:
//
// Check if _Float128 is defined by <stdlib.h> or <stdint.h>
//
//
//
//
//
//
//
//
// *****************************************************************************
// This software is licensed under the GNU General Public License v3
// (C) 2018-2019, Christophe de Dinechin <christophe@dinechin.org>
// *****************************************************************************
// This file is part of make-it-quick
//
// make-it-quick is free software: you can r redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// make-it-quick is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with make-it-quick, in a file named COPYING.
// If not, see <https://www.gnu.org/licenses/>.
// *****************************************************************************
#include <stdlib.h>
#include <stdint.h>
int main()
{
_Float128 x = 0.0;
return x == x && sizeof(_Float128) > sizeof(double) ? 0 : 1;
}

44
config/check_float80.c Normal file
View File

@ -0,0 +1,44 @@
// *****************************************************************************
// check_float80.c make-it-quick project
// *****************************************************************************
//
// File description:
//
// Check if _Float80 is defined by <stdlib.h> or <stdint.h>
//
//
//
//
//
//
//
//
// *****************************************************************************
// This software is licensed under the GNU General Public License v3
// (C) 2018-2019, Christophe de Dinechin <christophe@dinechin.org>
// *****************************************************************************
// This file is part of make-it-quick
//
// make-it-quick is free software: you can r redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// make-it-quick is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with make-it-quick, in a file named COPYING.
// If not, see <https://www.gnu.org/licenses/>.
// *****************************************************************************
#include <stdlib.h>
#include <stdint.h>
int main()
{
_Float80 x = 0.0;
return x == x && sizeof(_Float80) > sizeof(double) ? 0 : 1;
}