Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* lint -Q
@ 1993-04-28 16:30 Ken Warkentyne
  0 siblings, 0 replies; only message in thread
From: Ken Warkentyne @ 1993-04-28 16:30 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-04-28 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-04-28 16:30 lint -Q Ken Warkentyne

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