* C compiler: is this normal???????
@ 1996-07-08 4:00 Theo Vosse
1996-07-16 4:00 ` Craig Neth
0 siblings, 1 reply; 2+ messages in thread
From: Theo Vosse @ 1996-07-08 4:00 UTC (permalink / raw)
Hi,
I wrote in a program:
#include <ctype.h>
if (isalpha(*str))
And the compiler gave this awful warning:
/usr/lib/cmplrs/cc/cfe: Warning: dictcomp.c, line 209: No prototype for
this call (3.5.4.3)
if ((((*(__lc_ctype->core.iswctype)) == 0L) ?
(int) (__lc_ctype->_mask[*word] & (0x001)) :
(*(__lc_ctype->core.iswctype)) (*word,0x001,__lc_ctype)) )
^
/usr/lib/cmplrs/cc/cfe: Warning: dictcomp.c, line 211: No prototype for
this call (3.5.4.3)
char ch = ((int) (((*(__lc_ctype->core.towlower))
== 0L) ? __lc_ctype->_lower[*word] :
(*(__lc_ctype->core.towlower)) (*word,__lc_ctype))) ;
which looks just as incomprehensible as it is. Now when I execute the
program, I get a core dump on the line containing isalpha; it generates a
segmentation fault! Back to 'a' <= * str && *str <= 'z' again...
Is this normal, or does it have anything to do with the -xtaso_short
option? I do not have any documentation with exception of the man pages, since
DEC seems to be economical with documentation when you're under a campus license...
--
Theo Vosse
----------
Unit for Experimental Psychology
University of Leiden
The Netherlands
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: C compiler: is this normal???????
1996-07-08 4:00 C compiler: is this normal??????? Theo Vosse
@ 1996-07-16 4:00 ` Craig Neth
0 siblings, 0 replies; 2+ messages in thread
From: Craig Neth @ 1996-07-16 4:00 UTC (permalink / raw)
Theo Vosse wrote:
>
> Hi,
>
> I wrote in a program:
>
> #include <ctype.h>
>
> if (isalpha(*str))
>
> And the compiler gave this awful warning:
[... stuff deleted ...]
> Is this normal, or does it have anything to do with the -xtaso_short
> option? I do not have any documentation with exception of the man pages, since
> DEC seems to be economical with documentation when you're under a campus license...
It has _everything_ to do with the -xtaso_short option. The system
interfaces
are always 64 bits, and the system header files are not protected from
the
effects of the -xtaso_short option. The Programmers Guide (which you
obviously
don't have) explains all this. (It also gives a script you can use to
change
the headers on your system) If you change your program to:
#pragma pointer_size (save)
#pragma pointer_size (long)
#include <ctype.h>
#pragma pointer_size (restore)
[...]
It should work as you expect.
--
--------------------------------------------------------------------------------
Craig Neth ! neth@zk3.dec.com
Digital Equipment Corporation !
110 Spit Brook Road ZKO3-3/Y25 !
Nashua, NH 03062 ! Opinions expressed herein are my
own.
================================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-07-16 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-07-08 4:00 C compiler: is this normal??????? Theo Vosse
1996-07-16 4:00 ` Craig Neth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox