🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: be.comp.programming
4 messages
4 total messages Started by Michael De Nil Tue, 29 Mar 2005 10:19
specifieke pedantic warnings negeren met gcc
#1348
Author: Michael De Nil
Date: Tue, 29 Mar 2005 10:19
15 lines
1188 bytes
Dag iedereen, 

Weet er iemand of het mogelijk is specifieke warnings uit te schakelen
bij het compilen met gcc?

Momenteel geeft de output van gcc een massa 'ISO C forbids
braced-groups within expressions' warnings, waar ik niet direct rond
kan door de aard van het programma (fat-lib voor avr/dsp). Ik zou wel
liefst alle andere warnings, die pedantic weergeeft, nog wel willen
zien.


Alvast bedankt, 

Michael
Re: specifieke pedantic warnings negeren met gcc
#1359
Author: V
Date: Wed, 30 Mar 2005 18:38
24 lines
1926 bytes
"Michael De Nil" <michael@flex-it.be> wrote in message 
news:a7da44cb.0503290219.4b5ab293@posting.google.com...
> Dag iedereen,
>
> Weet er iemand of het mogelijk is specifieke warnings uit te schakelen
> bij het compilen met gcc?

Ja, is mogelijk.

> Momenteel geeft de output van gcc een massa 'ISO C forbids
> braced-groups within expressions' warnings, waar ik niet direct rond
> kan door de aard van het programma (fat-lib voor avr/dsp). Ik zou wel
> liefst alle andere warnings, die pedantic weergeeft, nog wel willen
> zien.

Ik gebruik nooit -pedantic, maar wel -Wall, eventueel ook nog samen met -W. 
Zie "info gcc".

Bijv. "gcc -O2 -Wall -W -Wno-uninitialized" om uninitialized warnings uit te 
schakelen, maar de meeste warnings wel. Die "-Wno-" werkt ook met -pedantic 
uiteraard.

-- 
V
Re: specifieke pedantic warnings negeren met gcc
#1360
Author: Philip Paeps
Date: Wed, 30 Mar 2005 20:46
35 lines
2605 bytes
Michael De Nil <michael@flex-it.be> wrote:
> Weet er iemand of het mogelijk is specifieke warnings uit te schakelen bij
> het compilen met gcc?

Volgens mij is het enkel mogelijk om specifieke warnings *aan* te schakelen...

> Momenteel geeft de output van gcc een massa 'ISO C forbids braced-groups
> within expressions' warnings, waar ik niet direct rond kan door de aard van
> het programma (fat-lib voor avr/dsp).

Beetje doorzettingsvermogen ;-)

> Ik zou wel liefst alle andere warnings, die pedantic weergeeft, nog wel
> willen zien.

Lees ``info gcc'' (GNU gelooft om ��n of andere compleet idiote reden niet in
gewone manpages) over de -W flags.  Zelf gebruik ik:

-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings
-Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
-Wnested-externs -Wredundant-decls

Ik denk niet dat dat zou zeuren over brace-groups in expressions (wat, als ik
me niet vergis, overigens perfect geldige C99 is).  Mogelijk kan je samen met
-pedantic ook -std=c99 of een andere C-standaard specifi�ren.

 -Philip

-- 
Philip Paeps                              Please don't email any replies
philip@paeps.cx                               I follow the newsgroup.

  BOFH Excuse #387:
    Your computer's union contract is set to expire at midnight.
Re: specifieke pedantic warnings negeren met gcc
#1361
Author: Philip Paeps
Date: Wed, 30 Mar 2005 21:16
16 lines
1778 bytes
Philip Paeps <philip+usenet@paeps.cx> wrote:
> Michael De Nil <michael@flex-it.be> wrote:
> > Weet er iemand of het mogelijk is specifieke warnings uit te schakelen bij
> > het compilen met gcc?
> 
> Volgens mij is het enkel mogelijk om specifieke warnings *aan* te schakelen...

En ik vergis me.  Voor elke -Wfoo is er ook een overeenstemmende -Wno-foo.

 - Philip

-- 
Philip Paeps                              Please don't email any replies
philip@paeps.cx                               I follow the newsgroup.

  The other line moves faster.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads