public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Typedef redeclaration -> Warning only ?
@ 2006-02-21  9:55 jnsagr01
  2006-02-21 14:44 ` John Love-Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: jnsagr01 @ 2006-02-21  9:55 UTC (permalink / raw)
  To: gcc-help


Hi

I wonder if there is an option for GCC to have multiple (and identical)
typedef declarations only issue a warning instead of an error... I searched
through the info-pages as on various forums/mailing lists but I didn't find
any answer.
Do you know if such an option exists ?

Thanks

Nicolas
--
View this message in context: http://www.nabble.com/Typedef-redeclaration--%3E-Warning-only--t1160845.html#a3046880
Sent from the gcc - Help forum at Nabble.com.

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

* Re: Typedef redeclaration -> Warning only ?
  2006-02-21  9:55 Typedef redeclaration -> Warning only ? jnsagr01
@ 2006-02-21 14:44 ` John Love-Jensen
  2006-02-22  9:13   ` nico.joyard
  0 siblings, 1 reply; 4+ messages in thread
From: John Love-Jensen @ 2006-02-21 14:44 UTC (permalink / raw)
  To: jnsagr01, MSX to GCC

Hi Nicolas,

C++ allows that.

C does not.

Can you use C++ and g++ instead of C and gcc?

Sincerely,
--Eljay

On 2/21/06 3:40 AM, "jnsagr01" <nico.joyard@free.fr> wrote:

> 
> Hi
> 
> I wonder if there is an option for GCC to have multiple (and identical)
> typedef declarations only issue a warning instead of an error... I searched
> through the info-pages as on various forums/mailing lists but I didn't find
> any answer.
> Do you know if such an option exists ?
> 
> Thanks
> 
> Nicolas
> --
> View this message in context:
> http://www.nabble.com/Typedef-redeclaration--%3E-Warning-only--t1160845.html#a
> 3046880
> Sent from the gcc - Help forum at Nabble.com.
> 

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

* Re: Typedef redeclaration -> Warning only ?
  2006-02-21 14:44 ` John Love-Jensen
@ 2006-02-22  9:13   ` nico.joyard
  2006-02-22 14:47     ` John Love-Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: nico.joyard @ 2006-02-22  9:13 UTC (permalink / raw)
  To: John Love-Jensen; +Cc: MSX to GCC

Hi and thanks for your answer.

Unfortunately I can't use C++ (I'm working in a big company on compilers for the
OS of mobiles phones, and they want to keep it pure C...). Isn't there an other
way to disable these errors ?

Sincerely,
Nicolas

John Love-Jensen <eljay@adobe.com> wrote:
> Hi Nicolas,
>
> C++ allows that.
>
> C does not.
>
> Can you use C++ and g++ instead of C and gcc?
>
> Sincerely,
> --Eljay
>
> On 2/21/06 3:40 AM, "jnsagr01" <nico.joyard@free.fr> wrote:
>
> >
> > Hi
> >
> > I wonder if there is an option for GCC to have multiple (and identical)
> > typedef declarations only issue a warning instead of an error... I searched
> > through the info-pages as on various forums/mailing lists but I didn't find
> > any answer.
> > Do you know if such an option exists ?
> >
> > Thanks
> >
> > Nicolas
> > --
> > View this message in context:
> >
> http://www.nabble.com/Typedef-redeclaration--%3E-Warning-only--t1160845.html#a
> > 3046880
> > Sent from the gcc - Help forum at Nabble.com.
> >
>
>


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

* Re: Typedef redeclaration -> Warning only ?
  2006-02-22  9:13   ` nico.joyard
@ 2006-02-22 14:47     ` John Love-Jensen
  0 siblings, 0 replies; 4+ messages in thread
From: John Love-Jensen @ 2006-02-22 14:47 UTC (permalink / raw)
  To: nico.joyard; +Cc: MSX to GCC

Hi Nicolas,

>Isn't there an other way to disable these errors ?

If you disable the errors, you fail to "keep it pure C".

My strong recommendation is to fix the errors.  Do not try to sweep them
under the rug by changing the language to "something that is very similar to
C, but is not C".  (That is to say, I discourage you making your own C-like
language just to patch some bad programming habits.)

Sincerely,
--Eljay

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

end of thread, other threads:[~2006-02-22 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-21  9:55 Typedef redeclaration -> Warning only ? jnsagr01
2006-02-21 14:44 ` John Love-Jensen
2006-02-22  9:13   ` nico.joyard
2006-02-22 14:47     ` John Love-Jensen

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).