public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: turning off warning messages in the source code
@ 2002-10-05  6:57 Ciaran O'Riordan
  2002-10-05 11:11 ` Gokhan Kisacikoglu
  0 siblings, 1 reply; 4+ messages in thread
From: Ciaran O'Riordan @ 2002-10-05  6:57 UTC (permalink / raw)
  To: kisa; +Cc: gcc-help


>Gokhan Kisacikoglu says:
>
>Do you know if there is any work in progress in terms of disabling
>certain compiler features from the source code, including the warnings?

I haven't heard it mentioned on the lists and it's not in the open
projects file.

After thinking about it I agree that this should be implemented, I
wonder if it would be easy.  there should be a ((no_warn)) attribute
for functions.  Errors would still be errors.  There have to be a
command line switch to forcibly override this too.

>label each with an id number, then it
>would be easier to turn these on/off

This would also be good but would take a lot more work to implement.

If you're stuck you could pipe the output of gcc to 'egrep -v'.  A bit
of a kludge but if it was in a Makefile or script you wouldn't
notice it.

If you're trying to block "unused variable `p'" warnings you could
give the variable the ((unused)) attribute.  That's the only GCC
solution I can think of.



_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: turning off warning messages in the source code
  2002-10-05  6:57 turning off warning messages in the source code Ciaran O'Riordan
@ 2002-10-05 11:11 ` Gokhan Kisacikoglu
  2002-10-07  5:25   ` John Love-Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Gokhan Kisacikoglu @ 2002-10-05 11:11 UTC (permalink / raw)
  To: Ciaran O'Riordan, gcc-help

> After thinking about it I agree that this should be implemented, I
> wonder if it would be easy.  there should be a ((no_warn)) attribute
> for functions.  Errors would still be errors.  There have to be a
> command line switch to forcibly override this too.
> 

Good to hear that there are similar opinions...

> If you're stuck you could pipe the output of gcc to 'egrep -v'.  A bit
> of a kludge but if it was in a Makefile or script you wouldn't
> notice it.

Our quick (?) solution is to put a special comment section in each of
the source files such as;

// PRAGMA: GCC_FLAG

... code ...

and preprocess the source code to extract the proper flags, then compile
the source code with these flags, all of these are setup in our makefile
system, so it is not painfull anymore to turn these on and off from the
source code. Basically we implemented these missing features ourselves
here, yet we can only turn it on or off per source file, rather than
source code sections -it would need the source code to be broken up into
smaller files to selectively compile with specific flags. We are open to
more ingenious solutions.

Anyway, if the functionality ever gets implemented, we will simply
replace these special comments with the real ones...

> If you're trying to block "unused variable `p'" warnings you could
> give the variable the ((unused)) attribute.  That's the only GCC
> solution I can think of.

Our problem is with the c-style casts and some other stuff from a 3rd
party software that we can not alter -or we'd rather not. But I didn't
know about the "unused", I will keep that in mind too...

Thanks,
Gokhan


-- 
Gökhan Kisacikoglu    			     CFX
Sr Technical Director		     	     10950 W Washington Blvd
kisa@centropolisfx.com   310.204.7300 x263   Culver City, CA, 90232
Key: Gö(GIrd)-khan Kis(arCUS)-a-(Art)-cik(loGIC)-og(thOUGH)-lu(fLU)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: turning off warning messages in the source code
  2002-10-05 11:11 ` Gokhan Kisacikoglu
@ 2002-10-07  5:25   ` John Love-Jensen
  2002-10-07  8:22     ` programming palm m130 Eduardo Osorio Armenta
  0 siblings, 1 reply; 4+ messages in thread
From: John Love-Jensen @ 2002-10-07  5:25 UTC (permalink / raw)
  To: gcc-help, Ciaran O'Riordan

Silly example (forgive the unintentional word wrap) of Gokhan's intriguing
idea.

--- makefile ---
PRAGMA_GCC_FLAG = $(shell grep '// PRAGMA: GCC_FLAG ' $<
| sed -e 's@// PRAGMA: GCC_FLAG @@')

Foo.o : Foo.cpp
    g++ -c -o $@ $(PRAGMA_GCC_FLAG) $<

--- Foo.cpp ---
// PRAGMA: GCC_FLAG -DBING="int bing = 7"
BING;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* programming palm m130
  2002-10-07  5:25   ` John Love-Jensen
@ 2002-10-07  8:22     ` Eduardo Osorio Armenta
  0 siblings, 0 replies; 4+ messages in thread
From: Eduardo Osorio Armenta @ 2002-10-07  8:22 UTC (permalink / raw)
  To: gcc-help


hi 

where i can get information to 
program palm m130 with GCC?

thanks

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-07 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-05  6:57 turning off warning messages in the source code Ciaran O'Riordan
2002-10-05 11:11 ` Gokhan Kisacikoglu
2002-10-07  5:25   ` John Love-Jensen
2002-10-07  8:22     ` programming palm m130 Eduardo Osorio Armenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).