| Deutsch English Français Italiano |
|
<vo60u8$3mapm$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: root <NoEMail@home.org>
Newsgroups: comp.os.linux.misc
Subject: Re: Compiler utility
Date: Fri, 7 Feb 2025 22:19:52 -0000 (UTC)
Organization: Linux Advocacy
Lines: 51
Message-ID: <vo60u8$3mapm$1@dont-email.me>
References: <vo3u4t$37omt$1@dont-email.me>
<wwvcyfujgcz.fsf@LkoBDZeT.terraraq.uk> <vo5h2s$3jith$2@dont-email.me>
<wwvjza1zf0v.fsf@LkoBDZeT.terraraq.uk>
Injection-Date: Fri, 07 Feb 2025 23:19:53 +0100 (CET)
Injection-Info: dont-email.me; posting-host="cd5378264f58f85e1e9712126a6f8ac9";
logging-data="3877686"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184p3ubSN46iQKgmNwiWuDYQGpfQyTIym4="
User-Agent: slrn/1.0.2 (Linux)
Cancel-Lock: sha1:BVHJe0rBT2+oKZkD1a908Cr3KPA=
Bytes: 2160
Richard Kettlewell <invalid@invalid.invalid> wrote:
>
> Post some example code, the exact command you used to compile it, and
> the errors you go.
>
Thanks for the offer Richard. I have moved beyond the problem.
I have what I need with the 11.2.0 compiler and the 6.12.12 kernel.
I think this will give an example of what I found:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termio.h>
#include <sys/wait.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <string.h>
#include <ctype.h>
int main();
//lots more code in here
int main(argc,argv)
int argc;
char *argv[];
{
exit(0);
}
The command first command would have been
simply gcc program.c -o program
then I tried stuff like:
gcc --std=gnu89 program.c -o program
The actual program I looked at had used forward
references and I put a large number of the
declarations up front. The new compiler flagged
the redefinitions as errors, not warnings as
might have been done with a duplicate #define.
I can't remember now what program it was, nor
for what compiler I originally used that would
have allowed the forward references.