| Subject: | Re: Enum type check in function call |
|---|---|
| From: | Ian Collins |
| Date: | Fri, 28 Mar 2008 19:20:09 +1300 |
| Newsgroups: | comp.lang.c |
Pritam wrote: > Facing a little issue with gcc ( maybe all c compiler have behaves > this way for the problem) > > Got a function that takes in a enumerated type. Even if another > enumerated type is passed 'gcc' does not raise any warnings or error. > 'g++' generates a error msg for the same. Is there a way to turn on > enum type checks while passing to functions in 'gcc'. > That's a "feature" of C, corrected in C++! Enums aren't really types in C. -- Ian Collins. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: case labels, Ian Collins |
|---|---|
| Next by Date: | Re: || putchar(ch == '\177' ? '?' : ch | 0100) == EOF), Keith Thompson |
| Previous by Thread: | Enum type check in function call, Pritam |
| Next by Thread: | Re: Enum type check in function call, Richard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |