Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: warkent@ltisun14.epfl.ch (Ken Warkentyne)
Subject: lint -Q
Date: 28 Apr 93 16:30:57 GMT	[thread overview]
Message-ID: <WARKENT.93Apr28183058@ltisun14.epfl.ch> (raw)

In "Porting Your ULTRIX Application to a DEC/OSF/1 System",
it is recommended to use "lint -Q" to find pointer to int
assignments.  However, "lint -Q" does not appear to do so.
Here is a small sample program:

#include <stdio.h>

main()
{
  int i;
  int *aptr, *bptr;

  aptr = &i;
  i = (int) aptr;
  bptr = (int *) i;
  printf("First addr: %lx\n",aptr);
  printf("Second addr: %lx\n",bptr);
}

Running lint -Q on this program produces no error message concerning
the incorrect type cast.  Running the program produces the expected
incorrect result:

  First addr: 11ffffd08
  Second addr: 1ffffd08

Needless to say, "lint -Q" has not been terribly helpful
in my porting task.

I ran this test on the axposf.pa.dec.com machine at 15:30 MET,
28 April
--
Ken Warkentyne - warkent@ltisun.epfl.ch
                 Laboratoire de Teleinformatique, EPFL, Suisse.


                 reply	other threads:[~1993-04-28 16:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox