zsh-workers
 help / color / mirror / code / Atom feed
* zsh 3.0.4 with IRIX 6.2/IDO
@ 1997-07-11 21:12 Jason R Mastaler
  1997-07-11 22:03 ` Bart Schaefer
  1997-07-14  8:20 ` Andrew Main
  0 siblings, 2 replies; 4+ messages in thread
From: Jason R Mastaler @ 1997-07-11 21:12 UTC (permalink / raw)
  To: zsh-workers

I'd like to compile zsh without GCC (for various reasons), so I'm
using the SGI C compiler (IDO).  When configuring with GCC, the
compiler flags "-Wall -Wno-implicit -Wmissing-prototypes -O2" are
chosen by default.  These flags aren't available for the IDO
obviously, but they must have been chosen for a reason.  Can anyone
who has experience with zsh and IRIX/IDO recommend any particular
compiler flags to use?  For now, I'm just going with "-O2".  Thanks.

BTW, compilation did yield one non-fatal warning I thought I'd bring
to your attention.  Otherwise, no problems.

        cc -c -I.. -I. -I.  -DHAVE_CONFIG_H -O2 zle_tricky.c
cfe: Warning 709: zle_tricky.c, line 1553: Incompatible pointer type assignment
        cb.foreach = (int ((*) (void) )) match_username;
        -----------^

   Jason R. Mastaler                      jason@mastaler.com

(I'm only on zsh-users, so please CC: me on any replies to the list)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh 3.0.4 with IRIX 6.2/IDO
  1997-07-11 21:12 zsh 3.0.4 with IRIX 6.2/IDO Jason R Mastaler
@ 1997-07-11 22:03 ` Bart Schaefer
  1997-07-14  8:20 ` Andrew Main
  1 sibling, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1997-07-11 22:03 UTC (permalink / raw)
  To: Jason R Mastaler, zsh-workers

On Jul 11,  3:12pm, Jason R Mastaler wrote:
> Subject: zsh 3.0.4 with IRIX 6.2/IDO
> using the SGI C compiler (IDO).  When configuring with GCC, the
> compiler flags "-Wall -Wno-implicit -Wmissing-prototypes -O2" are

Anything with a -W is just a warning.  Unless you're planning to fix
bugs, you can ignore them completely.

> BTW, compilation did yield one non-fatal warning I thought I'd bring
> to your attention.  Otherwise, no problems.
> 
>         cc -c -I.. -I. -I.  -DHAVE_CONFIG_H -O2 zle_tricky.c
> cfe: Warning 709: zle_tricky.c, line 1553: Incompatible pointer type assignment
>         cb.foreach = (int ((*) (void) )) match_username;
>         -----------^

Yeah, the standard doesn't require that pointers to function be assignable
to pointer to anything else.  No unix compiler that I know of actually has
that restriction.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh 3.0.4 with IRIX 6.2/IDO
  1997-07-11 21:12 zsh 3.0.4 with IRIX 6.2/IDO Jason R Mastaler
  1997-07-11 22:03 ` Bart Schaefer
@ 1997-07-14  8:20 ` Andrew Main
  1997-07-14  9:55   ` Peter Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Main @ 1997-07-14  8:20 UTC (permalink / raw)
  To: Jason R Mastaler; +Cc: zsh-workers

Jason R Mastaler wrote:
>I'd like to compile zsh without GCC (for various reasons), so I'm
>using the SGI C compiler (IDO).  When configuring with GCC, the
>compiler flags "-Wall -Wno-implicit -Wmissing-prototypes -O2" are
>chosen by default.  These flags aren't available for the IDO
>obviously, but they must have been chosen for a reason.

They were chosen because they warn about most undesirable constructs.
In order to use a non-GCC compiler, just export the environment variable
CC in the environment of configure.  For example,

CC=cc ./configure

will use cc as the compiler, and "-O" as CFLAGS (which you can override
in the same way).

>BTW, compilation did yield one non-fatal warning I thought I'd bring
>to your attention.  Otherwise, no problems.
>
>        cc -c -I.. -I. -I.  -DHAVE_CONFIG_H -O2 zle_tricky.c
>cfe: Warning 709: zle_tricky.c, line 1553: Incompatible pointer type assignment
>        cb.foreach = (int ((*) (void) )) match_username;
>        -----------^

Question to developers: why was the (void) added?  It seems to have been
fine with just ().

-zefram


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh 3.0.4 with IRIX 6.2/IDO
  1997-07-14  8:20 ` Andrew Main
@ 1997-07-14  9:55   ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 1997-07-14  9:55 UTC (permalink / raw)
  To: Zsh hackers list

Andrew Main wrote:
> Jason R Mastaler wrote:
> 
> >BTW, compilation did yield one non-fatal warning I thought I'd bring
> >to your attention.  Otherwise, no problems.
> >
> >        cc -c -I.. -I. -I.  -DHAVE_CONFIG_H -O2 zle_tricky.c
> >cfe: Warning 709: zle_tricky.c, line 1553: Incompatible pointer type assignm
> ent
> >        cb.foreach = (int ((*) (void) )) match_username;
> >        -----------^
> 
> Question to developers: why was the (void) added?  It seems to have been
> fine with just ().

It's strange, because the (void) actually makes it wrong, implying it
takes no argument which is incorrect.  I would certainly suggest
either () or if there are compilers that like function pointers
to have arguments in their prototypes then the full
(int, char *, int, char *, int, char*)
which, even if it is sometimes the odd pointer out (though I would have
thought the NIS standard was fixed?), is nearer the mark than (void).

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-07-14 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-11 21:12 zsh 3.0.4 with IRIX 6.2/IDO Jason R Mastaler
1997-07-11 22:03 ` Bart Schaefer
1997-07-14  8:20 ` Andrew Main
1997-07-14  9:55   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).