Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #65258

Re: Compiler utility

From vallor <vallor@cultnix.org>
Newsgroups comp.os.linux.misc
Subject Re: Compiler utility
Date 2025-02-07 17:51 +0000
Message-ID <m0mvhfFakt5U2@mid.individual.net> (permalink)
References <vo3u4t$37omt$1@dont-email.me> <m0lfelFquhsU4@mid.individual.net> <vo5g9e$3jith$1@dont-email.me>

Show all headers | View raw


On Fri, 7 Feb 2025 17:35:43 -0000 (UTC), root <NoEMail@home.org> wrote in
<vo5g9e$3jith$1@dont-email.me>:

> vallor <vallor@cultnix.org> wrote:
>>
>> You can probably get the code to compile with the proper "--std="
>> directive to gcc.
>>
>>
> I tried std=gnu89, but that didn't fix the problem.
> 
> A really strange thing: one of my old programs had a list of routines at
> the front, with entries like:
> int main ();
> void this();
> 
> etc.
> 
> when the compiler encountered the line
> 
> int main(argc,argv)
> 
> it threw up an error.

Not sure what would be going on there.

$ cat try.c
#include <stdio.h>

int main();
void this();

int main(argc,argv)
int argc;
char ** argv;
{
printf("%s\n","Does this work?");
return 0;
}

$ make try
cc "-std=gnu89"    try.c   -o try

$ ./try
Does this work?

$ cat try2.c
#include <stdio.h>

int main();
void this();

int main(argc,argv)
/*int argc;
char ** argv;*/
{
printf("%s\n","Does this work?");
return 0;
}

$ make try2
cc "-std=gnu89"    try2.c   -o try2

$ ./try2
Does this work?

$ gcc --version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

-- 
-v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti
   OS: Linux 6.13.1 Release: Mint 22.1 Mem: 258G
   "Come any closer and I'll use my magnet!"

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Compiler utility root <NoEMail@home.org> - 2025-02-07 03:19 +0000
  Re: Compiler utility vallor <vallor@cultnix.org> - 2025-02-07 04:11 +0000
    Re: Compiler utility rbowman <bowman@montana.com> - 2025-02-07 06:05 +0000
    Re: Compiler utility root <NoEMail@home.org> - 2025-02-07 17:35 +0000
      Re: Compiler utility vallor <vallor@cultnix.org> - 2025-02-07 17:51 +0000
      Re: Compiler utility The Natural Philosopher <tnp@invalid.invalid> - 2025-02-07 22:28 +0000
        Re: Compiler utility Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2025-02-07 22:44 +0000
          Re: Compiler utility Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-02-08 03:30 +0000
          Re: Compiler utility The Natural Philosopher <tnp@invalid.invalid> - 2025-02-08 13:12 +0000
        Re: Compiler utility root <NoEMail@home.org> - 2025-02-09 04:51 +0000
  Re: Compiler utility Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-02-07 06:02 +0000
    Re: Compiler utility "WokieSux282@ud0s4.net" <WokieSux283@ud0s4.net> - 2025-02-07 01:06 -0500
  Re: Compiler utility Richard Kettlewell <invalid@invalid.invalid> - 2025-02-07 08:42 +0000
    Re: Compiler utility root <NoEMail@home.org> - 2025-02-07 17:49 +0000
      Re: Compiler utility Richard Kettlewell <invalid@invalid.invalid> - 2025-02-07 20:16 +0000
        Re: Compiler utility root <NoEMail@home.org> - 2025-02-07 22:19 +0000

csiph-web