[Bug c/78736] enum warnings in GCC (request for -Wenum-conversion to be added)

2019-08-28 Thread indan at nul dot nu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78736

Indan  changed:

   What|Removed |Added

 CC||indan at nul dot nu

--- Comment #13 from Indan  ---
Please implement -Wenum-conversion already, there were working patches for it
in 2017 and now it's 2019!

Just don't enable it by default if that complicates anything.

[Bug c/24241] New: undefined reference to main when linking an object file generated from multiple .c files

2005-10-06 Thread indan at nul dot nu
When making object files from multiple source files the main function seems to
be thrown away or something. When compiling the .c into .o files seperately,
and then linking that it works. It used to work with at least gcc 3.4.3.

Minimal testcase:

$ cat main.c 
int main(void)
{
return 7;
}

$ make
cc -o test.o -c  main.c empty.c
cc -s  test.o   -o test
/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../crt1.o: In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [test] Error 1

$ objdump -t test.o 

test.o: file format elf32-i386

SYMBOL TABLE:
 ldf *ABS*   empty.c
 ld  .text   .text
 ld  .data   .data
 ld  .bss    .bss
 ld  .note.GNU-stack .note.GNU-stack
 ld  .comment    .comment

$ cat empty.c

$ cat Makefile 

default: test

test.o: main.c empty.c
cc -o test.o -c main.c empty.c

clean:
rm -f *.o test


-- 
   Summary: undefined reference to main when linking an object file
generated from multiple .c files
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: indan at nul dot nu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24241



[Bug c/24241] undefined reference to main when linking an object file generated from multiple .c files

2005-10-06 Thread indan at nul dot nu


--- Comment #3 from indan at nul dot nu  2005-10-06 17:27 ---
(In reply to comment #2)
> Note if you want the compiling multiple .c into one .o files use -combine.
> 

Thanks for the quick reply and the tip.

Shouldn't gcc either give an error, or restore the old behaviour? Would a patch
doing one of the two be accepted? If so, what behaviour is prefered?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24241



[Bug driver/22544] [4.0/4.1 Regression] gcc ignores input file given on the command line

2005-10-16 Thread indan at nul dot nu


--- Comment #7 from indan at nul dot nu  2005-10-16 12:06 ---
Was the non-standard behaviour in 3.4 a bug or a feature? In any case, isn't it
reasonable to mention the -combine option in the error message? Something like:

fatal ("cannot specify -o with -c or -S with multiple files. Try -combine");

I don't have the gcc code, but you check for have_c && have_o, but can have_o
ever be true for -S?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22544