Re: compilacao no gcc do potato
- Original Message - From: Giuliano Cardozo Medalha [EMAIL PROTECTED] To: debian-user-portuguese@lists.debian.org Sent: Sunday, July 07, 2002 9:50 PM Subject: compilacao no gcc do potato Pessoal, Uma duvida em relacao ao compilador gcc do potato. Manda bala... Porque ao compilar um programa simples (teste.c) do tipo: void main(void) } Bem, os padrões exigem que main seja do tipo int. Além disso este programa não esta fazendo muita coisa, portando o compilador provavelmente ira chiar. Tente com o código: int main(void) { int a; return 0; } $cc -o teste teste.c - com as opcoes gcc -o teste teste.c -Wall eu estou recebendo o seguinte WARNING teste.c:2: warning: return type of `main' is not `int' Como eu poderia chegar todas as mensagens de erros do compilador ? Presumo que queira visualizar todas as mensagens de erro. Bem, até onde eu saiba, as mais relevantes são exibidas automaticamente. Obrigado Giuliano -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] Kromagg -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
compilacao no gcc do potato
Pessoal, Uma duvida em relacao ao compilador gcc do potato. Porque ao compilar um programa simples (teste.c) do tipo: void main(void) { } - com as opcoes gcc -o teste teste.c -Wall eu estou recebendo o seguinte WARNING teste.c:2: warning: return type of `main' is not `int' Como eu poderia chegar todas as mensagens de erros do compilador ? Obrigado Giuliano -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: compilacao no gcc do potato
Em Dom 07 Jul 2002 21:50, Giuliano Cardozo Medalha escreveu: Pessoal, Uma duvida em relacao ao compilador gcc do potato. Porque ao compilar um programa simples (teste.c) do tipo: void main(void) { } - com as opcoes gcc -o teste teste.c -Wall eu estou recebendo o seguinte WARNING teste.c:2: warning: return type of `main' is not `int' A função main retorna um int, não é void, deveria ser: int main ( Como eu poderia chegar todas as mensagens de erros do compilador ? Como assim chegar? Não seria checar? Obrigado Giuliano Huberto -- / Huberto Gastal Mayer [EMAIL PROTECTED] ICQ# 43761791 http://betogm.cjb.net / -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: gcc in potato
On Mon, Oct 18, 1999 at 22:26:13 -0400, Christopher J. Morrone wrote: gcc version 2.95.2 19990906 (prerelease) Seems to be pretty damn buggy. There is a great store of code I have that compiled under the last one I used: gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release) That won't compile under the new one. Which in no way implies the new gcc is buggy. The problem may very well be your code. Bug reports for gcc are welcome, but please make sure the problem is really a gcc one, not one in your code. For instance, this assembly function won't compile under 2.95.2, but is fine under 2.91.66: 2.95.2 does a lot more checks relating to assembly; check out the documentation that comes with it, or have a look at what the kernel folks are doing. HTH, Ray -- J.H.M. Dassen | RUMOUR Believe all you hear. Your world may [EMAIL PROTECTED] | not be a better one than the one the blocks | live in but it'll be a sight more vivid. | - The Hipcrime Vocab by Chad C. Mulligan
gcc in potato
I am not sure where to complain about this...it probably isn't Debian's problem, it is probably the new gcc. The newest gcc in potato: gcc version 2.95.2 19990906 (prerelease) Seems to be pretty damn buggy. There is a great store of code I have that compiled under the last one I used: gcc version egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release) That won't compile under the new one. For instance, this assembly function won't compile under 2.95.2, but is fine under 2.91.66: /* Read the pentium Time Stamp Counter register */ unsigned long long read_TSC() { static union { unsigned long dw[2]; unsigned long long counter; } tc; __asm__ __volatile__ ( .byte 0x0f, 0x31\n :d= (tc.dw[1]), a= (tc.dw[0]): :%eax, %edx ); return tc.counter; } And I get this error: arch.c: In function `read_TSC': arch.c:30: warning: output constraint `=' for operand 0 is not at the beginning arch.c:30: warning: output constraint `=' for operand 1 is not at the beginning arch.c:30: Invalid `asm' statement: arch.c:30: fixed or forbidden register 0 (ax) was spilled for class AREG. make: *** [arch.o] Error 1 Should I just give up and use the gcc272 package?