This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

K&R style prototypes


I compile the following with:

gcc -ansi -pedantic-errors code.c

and it didn't give any errors, how come?

--jc
-------------------------------------------------
struct s_struct
        {
        float f;
        };

void
func(s, f)
struct s_struct *s;
float f;
        {
        s->f = f;
        }

int
main()
        {
        struct s_struct s;
        func(&s, 1.9);
        return 0;
        }

--
Jimen Ching (WH6BRR)      jching@flex.com     wh6brr@uhm.ampr.org



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]