🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52353

Are these bugs?

#52353
From: Thomas Engstrom
Date: Thu, 26 Nov 1992 09:46
67 lines
2543 bytes
I've had some problems for a while now, but always could go around them
with ultrix 4.2 cc when needed. It's just that I would like to use gcc
all the time so if someone could answer this I would appreciate it.

gcc 2.2.2 on ultrix 4.2 says this when making perl:

In file included from /usr/include/sys/param.h:305, from perl.h:138, from perly.c:38:
/usr/include/sys/types.h:114: syntax error before `char'

The lines in /usr/include/sys/types.h looks like this:

110	typedef
111	#ifdef __mips
112		signed
113	#endif /* __mips */
114			char	s_char;

What about it? Why is that an error?

When compiling this code:

#include <stdio.h>
#include <ctype.h>

void convert(char *);

main()
{
  char str[10];

  gets(str);
  convert(str);
  printf("%s\n",str);
}

void
convert(char *s)
{
  while (*s) {
    *s < 97 ? *s += 32 : *s -= 32; /* This is line 19 */
    s++;
  }
}

gcc says this:

convert.c: In function `convert':
convert.c:19: invalid lvalue in assignment

Both these "bugs" slips thru cc and there seems to be nothing wrong with
neither perl or the convert program when testing them. So why doesn't gcc
like them?

Am I a little slowheaded, should I return to pascal or is there something else?
_______________________________________________________________________________
                             |            Thomas Engstrom | +46 13 28 1260
               X             |    University of Linkoping | fax: +46 13 28 2800
                             | S-581 83 Linkoping, SWEDEN | ThoEn@LIDAC.LiU.se




-- 
_______________________________________________________________________________
                             |            Thomas Engstrom | +46 13 28 1260
               X             |    University of Linkoping | fax: +46 13 28 2800
                             | S-581 83 Linkoping, SWEDEN | ThoEn@LIDAC.LiU.se
Technical Details
Message-ID: <1992Nov26.094656.9220@linda.lidac.liu.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!liuida!linda!thenglid

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,98047fce26d8ef28,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-11-26 11:46:46 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!liuida!linda!thenglid
From: thenglid@linda.lidac.liu.se (Thomas Engstrom)
Subject: Are these bugs?
Message-ID: <1992Nov26.094656.9220@linda.lidac.liu.se>
Summary: problem with include files & ?: operator
Keywords: include files, ?: operator
Organization: Computer Service Centre, University of Linkoping
Date: Thu, 26 Nov 1992 09:46:56 GMT
Lines: 67