summaryrefslogtreecommitdiff
path: root/src/mpfr-sassert.h
Commit message (Collapse)AuthorAgeFilesLines
* Copyright notice update: added 2021 withvlefevre2021-01-031-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2020)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2020 from the example in the doc/README.dev file. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14229 280ebfd0-de03-0410-8827-d642c229c3f4
* Removed MPFR_DECL_STATIC_ASSERT macro as it was buggy, unused, rathervlefevre2020-06-091-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | useless, and it had drawbacks. Details: * In src/mpfr-sassert.h, the default definition of this macro in the MPFR_USE_STATIC_ASSERT case ended with a spurious ";". Since this macro was unused, this wasn't noticeable... except in the configure test for static assertions, which failed in some cases (e.g. with CFLAGS="-std=c99 -pedantic-errors -Wno-error=overlength-strings") for this reason, which had the effect to let MPFR_USE_STATIC_ASSERT undefined, while static assertions were actually working. * Still in src/mpfr-sassert.h, but when MPFR_USE_STATIC_ASSERT is not defined, the MPFR_DECL_STATIC_ASSERT(c) expanded to nothing, which would yield invalid code as MPFR_DECL_STATIC_ASSERT(some_assertion); would yield an extra ";" (about the same issue as above). Given the fact that the portable MPFR_USE_STATIC_ASSERT code does not work with this compiler, it is not clear whether this is fixable in a completely reliable way. * MPFR_DECL_STATIC_ASSERT can be replaced by MPFR_STAT_STATIC_ASSERT after moving it to the statement section of a function, with almost no drawbacks (just a bit readability in some cases?). * When MPFR_USE_STATIC_ASSERT is not defined, MPFR_STAT_STATIC_ASSERT will check the assertion at run time (for free, since the result is known at compile time), while MPFR_DECL_STATIC_ASSERT would not be able to do anything useful. Changes: * acinclude.m4: removed the test of MPFR_DECL_STATIC_ASSERT. * src/mpfr-sassert.h: removed MPFR_DECL_STATIC_ASSERT definitions. * tune/tuneup.c: removed MPFR_DECL_STATIC_ASSERT redefinition. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13947 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated URLs of the GCC mailing-list archives.vlefevre2020-04-081-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13877 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2020 withvlefevre2020-01-081-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2019)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2019 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13652 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated the www.gnu.org URL's (http → https) on all the files with:vlefevre2019-01-071-1/+1
| | | | | | | perl -pi -e 's,http://www.gnu.org/,https://www.gnu.org/,g' **/*(.) under zsh. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13372 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2019 withvlefevre2019-01-011-1/+1
| | | | | | | | perl -pi -e 's/ (\d{4}-)?(2018)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh. Removed 2018 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13359 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-sassert.h] Added a comment.vlefevre2018-04-131-0/+5
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12592 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2018 withvlefevre2018-01-031-1/+1
| | | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2017)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the ck-mparam and timings-mpfr.c files and the mbench directory under "tools" (not distributed with MPFR). Removed 2017 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12067 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2017 withvlefevre2017-01-011-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2016)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2016 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11117 280ebfd0-de03-0410-8827-d642c229c3f4
* Replacedvlefevre2016-02-041-1/+1
| | | | | | | | Contributed by the AriC and Caramel projects by Contributed by the AriC and Caramba projects git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9941 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2016 withvlefevre2016-01-011-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2015)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the m4 and tools/mbench directories were not modified). Removed 2015 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9779 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2015 withvlefevre2015-02-131-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2014)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh, reverting the tools/mbench directory (not distributed with MPFR). Removed 2014 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9278 280ebfd0-de03-0410-8827-d642c229c3f4
* Updated URL's.vlefevre2014-06-221-1/+1
| | | | git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9081 280ebfd0-de03-0410-8827-d642c229c3f4
* When static assertions are not supported by the C implementationvlefevre2014-01-091-0/+2
| | | | | | | | | | | | | | | | natively (new C11 feature), their MPFR implementation got broken by changeset r8625, as the __MPFR_GNUC macro in mpfr-sassert.h was not defined in the configure test (since mpfr-impl.h wasn't included) and generated an error, disabling the static assertions support. This is fixed by the following changes, avoiding code duplication and thus risk of inconsistencies in future modification: * copied some of the version detection macros from mpfr-impl.h to a standalone file mpfr-cvers.h, and updated the macros; * in mpfr-impl.h, replaced these macros by a #include "mpfr-cvers.h" and updated a comment; * in mpfr-sassert.h, added a #include "mpfr-cvers.h". git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8739 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2014 withvlefevre2014-01-031-1/+1
| | | | | | | | | perl -pi -e 's/ (\d{4}-)?(2013)(?= Free Software)/ " ".($1||"$2-").($2+1)/e' **/*(^/) under zsh (the tools/mbench directory was not modified). Removed 2013 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8723 280ebfd0-de03-0410-8827-d642c229c3f4
* [src/mpfr-sassert.h] Get rid of annoying warningsvlefevre2013-07-221-1/+10
| | | | | | | | typedef 'MPFR_ASSERT_xxx' locally defined but not used with GCC 4.8+ (better than the non-portable solution r8618). Thanks to Jonathan Wakely: http://gcc.gnu.org/ml/gcc-help/2013-07/msg00142.html git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8625 280ebfd0-de03-0410-8827-d642c229c3f4
* Use copyright year ranges, followingvlefevre2013-05-301-1/+1
| | | | | | http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8540 280ebfd0-de03-0410-8827-d642c229c3f4
* Copyright notice update: added 2013 withvlefevre2013-01-031-1/+1
| | | | | | | | | perl -pi -e 's/2012 Free Software/2012, 2013 Free Software/' **/*(^/) under zsh, reverting the ChangeLog file and the m4 directory (the tools/mbench directory was not modified). Removed 2012 from the example in the doc/README.dev file. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8447 280ebfd0-de03-0410-8827-d642c229c3f4
* Added Static Assertion support (modified patch from Patrick).vlefevre2012-06-251-0/+64
* Added src/mpfr-sassert.h: implementation of static assertions. * src/mpfr-impl.h: include "mpfr-sassert.h". * acinclude.m4: test whether static assertions are supported. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8241 280ebfd0-de03-0410-8827-d642c229c3f4