Re: virtual/real variable types

From: George Greer (greerga@circlemud.org)
Date: 12/05/01


On Tue, 4 Dec 2001, krenshala wrote:

>What error do you get from GCC if there are still -1's floating around
>instead of NOWHER (or whichever)?

A watered-down example:

#include <stdlib.h>

int main(int argc, char *argv[])
{
  unsigned int test;

  test = atoi(argv[1]);
  if (test < 0)
    exit(1);
  else
    exit(0);
}

greerga@moving:~/code$ gcc -O2 -Wall -W -o unsigned unsigned.c
unsigned.c: In function `main':
unsigned.c:8: warning: comparison of unsigned expression < 0 is always false

NOWHERE was redefined to 65535 before I started so it too wouldn't generate
warnings.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT