9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Lee Duhem <lee.duhem@gmail.com>
To: 9fans@cse.psu.edu
Subject: [9fans] 8c's feature or bug?
Date: Fri,  9 Feb 2007 01:28:08 +0800	[thread overview]
Message-ID: <20070208172808.GA9111@debian> (raw)

Hi all,

Is this a feature or bug of 8c? Look at this:

term% cat t.c
#include <u.h>
#include <libc.h>

#define ARGS(list) list

void foo ARGS((char));
void foo1 ARGS((int));

void main(void)
{
    foo('s');
    foo1(1);
    exits(nil);
}

void foo (b)
char b;
{
}

void foo1 (b)
int b;
{
}

term% 8c -FVw t.c
t.c:17 function inconsistently declared: foo
warning: t.c:17 param declared and not used: b
warning: t.c:22 param declared and not used: b

My question is: Why I get the "function inconsistently declared" error?
or Why I'm not get the same error about foo1?

Lee


             reply	other threads:[~2007-02-08 17:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 17:28 Lee Duhem [this message]
2007-02-08 17:33 ` Charles Forsyth
2007-02-08 18:01   ` Lee Duhem
2007-02-08 17:59     ` Russ Cox
2007-02-08 18:48     ` Charles Forsyth
2007-02-09 10:09       ` Lee Duhem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070208172808.GA9111@debian \
    --to=lee.duhem@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).