Re: 'C' Operators precedence

Ben Pfaff (
20 May 1998 10:23:26 -0400

I am going to answer this thread only once.

Well, you provided a wrong answer, in any case.

Read a text like:
C:Step-by-Step, Waite & Prata, The White Group, Howard W Sams Publ.
ISBM 0-672-22651-0
Page 500, 14.2
Quote "
pfun = atof;
you can use this call to invoke the atof() function:
Some C compilers have allowed the following usage when pfun is a
pfun(string) /* rogue usage */
Note:Neither ANSI C nor K&R C supports this form.
" End quote.

WRONG. See ANSI C standard section Function Calls: `The
expression that denotes the called function shall have type pointer to
function...', or Example 2 following section 6.7.1, which explicitly
shows that (*funcp)() is equivalent to funcp(), when funcp is declared
as int (*funcp)(void).

This is a "Beginners" Text. It tells what 'C' is, what the rules are
and how it is supposed to used.

Well, they could at least make an effort to be correct.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to