1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Update #pragmas to make clang be quiet about historic practice

This adds a #pragma to disable -Wdeprecated-register* on newer
versions of clang. We could remove all use of the register keyword
instead, as modern compilers ignore it. But it's not harmful, and
for the time being I prefer not to do doing any reformatting or
changing the historic character of this code base.

The #pragmas are removed from src/lib/libast/include/ast.h, because
they're better placed in src/lib/libast/features/common which
generates ast_common.h which is included by everything.

* https://clang.llvm.org/docs/DiagnosticsReference.html#wdeprecated-register
This commit is contained in:
Martijn Dekker 2021-05-07 06:36:14 +01:00
parent 38654f0946
commit 2758e5db19
8 changed files with 8 additions and 2 deletions

View file

@ -19,6 +19,7 @@
* *
***********************************************************************/
#pragma prototyped
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wparentheses"
/*

View file

@ -18,6 +18,7 @@
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wunused-value"
#pragma clang diagnostic ignored "-Wstring-plus-int"

View file

@ -4,6 +4,7 @@
* coded for portability
* _SEAR_* macros for win32 self extracting archives -- see sear(1).
*/
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wparentheses"
static char id[] = "\n@(#)$Id: ratz (Jean-loup Gailly, Mark Adler, Glenn Fowler) 1.2.3 2010-10-10 $\0\n";

View file

@ -19,6 +19,7 @@
* *
***********************************************************************/
#pragma prototyped
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wparentheses"
/*

View file

@ -24,8 +24,10 @@ tst ptr_void note{ standard C void* ok }end compile{
}end
cat{
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wmacro-redefined"
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wstring-plus-int"
#pragma clang diagnostic ignored "-Wunused-value"
/* disable non-standard linux/gnu inlines */

View file

@ -21,6 +21,7 @@
* *
***********************************************************************/
#pragma prototyped
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wparentheses"
/*
* Glenn Fowler

View file

@ -21,8 +21,6 @@
* *
***********************************************************************/
#pragma prototyped
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wstring-plus-int"
/*
* Advanced Software Technology Library

View file

@ -20,6 +20,7 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma clang diagnostic ignored "-Wdeprecated-register"
#pragma clang diagnostic ignored "-Wparentheses"
/*
* generate <lc.h> implementation tables from lc.tab