Article View: gnu.gcc.help
Article #53160ANNOUNCE: XView argument checking with gcc 2.0.
From: abraham
Date: Fri, 28 Feb 1992 09:01
Date: Fri, 28 Feb 1992 09:01
82 lines
3900 bytes
3900 bytes
A patch to gcc 2.0 providing limited argument checking for xv_set and
xv_create (like gcc 2.0 already does for *printf and *scanf), is
available by anonymous ftp. See the README file, which is included
below.
Warning: I began working on the patch yesterday...
***********************************************************************
XView support for gcc:
----------------------
HISTORY:
Inspired by the way gcc now checks the arguments to printf and scanf
family of varargs functions, I decided to try to implement similar
support for the xv_set and xv_create functions used by the XView
graphical toolkit.
* Version 0.0 alpha for gcc-2.0
It now finds the single (harmless) error in Ftptool 4.1, and does not
crash in the process, so I will let it go. Use on your own risk.
Version 0.0 alpha should work with XView 3.0 or older. Future
versions of XView will most likely cause "-Wxview" and "-Wxview-type"
to generate more spurious warnings.
DESCRIPTION:
Add two new warning to gcc. They are both disabled by defaults.
"-Wxview": Generate warnings if xv_set or xv_create are called with
the wrong number of arguments, if a XView attribute is not an integer
constant, or if any argument is more than 32 bit wide.
"-Wxview-type": Generate warnings if an argument to an XView attribute
is not of the expected type. Distinguishes between three types:
integer, pointer, and opaque, where opaque can match any type. May
generate spurious warnings, since the XView include files contains
incorrect type information for many attributes. Does not work without
"-Wxview".
PROBLEMS:
- Does not support xv_get or xv_find.
- Does not check if attribute is defined for the receiving object.
- "-Wxview" does not complain about structure arguments.
- "-Wxview-type" should distinguish between more types.
- "-Wxview" complains about attribute variables.
- XView extensions may cause more spurious warnings.
INSTALLATION:
Get gcc-2.0 from your favorite source of free software.
Get /pub/gcc-2.0-xview-0.0.tar.Z by anonymous ftp
from hugin.dk (129.142.51.10).
Replace the "c-decl.c" and "c-typeck.c" files in gcc source directory,
and place the xview directory also in the gcc source directory.
Compile and install the new version of gcc using the normal procedure.
Hint:
If you want to keep both the official and the XView version of
gcc, then create a $gnulib/gcc/$ARCH/xview, and keep the official
version in $gnulib/gcc/$ARCH/2.0. Make symbolic links from everything
in $gnulib/gcc/$ARCH/2.0 to $gnulib/gcc/$ARCH/xview, except cc1. cc1
is the only program affected by the changes.
You will now be able to invoke the official version with "gcc" and the
XView version with "gcc -V xview".
LEGAL NOTICE:
Everything in the XView directory is owned by SMI, the changes to the
"c-decl.c" are owned by me, and the changes to "c-typeck.c" are owned
by me and possibly by SMI. Read the file xview/LEGAL_NOTICE for SMI's
position. I would be happy to transfer ownership to the FSF.
Written by Per Abrahamsen (abraham@hugin.dk).
Technical Details
Message-ID:
<ABRAHAM.92Feb28090113@thor.iesd.auc.dk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!sunic!dkuug!iesd!iesd.auc.dk!abrahamShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a983e60440cb3053,start X-Google-Attributes: gid11318c,public X-Google-Thread: 11580b,a983e60440cb3053,start X-Google-Attributes: gid11580b,public X-Google-Thread: 11090d,a983e60440cb3053,start X-Google-Attributes: gid11090d,public X-Google-ArrivalTime: 1992-02-28 15:44:51 PST Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!sunic!dkuug!iesd!iesd.auc.dk!abraham From: abraham@hugin.dk Newsgroups: gnu.gcc.help,alt.toolkits.xview,comp.windows.open-look Subject: ANNOUNCE: XView argument checking with gcc 2.0. Message-ID: <ABRAHAM.92Feb28090113@thor.iesd.auc.dk> Date: 28 Feb 92 09:01:13 GMT Sender: root@iesd.auc.dk (Operator) Organization: HUGIN Expert A/S Lines: 82