Loading ...
Sorry, an error occurred while loading the content.

Re: [hackers-il] C syntax wonders

Expand Messages
  • Oleg Goldshmidt
    ... Looks legal to me, though I have not checked the appropriate Testaments. You can also do extern int f(void); int (*f)(void) = foo; Does that bother you?
    Message 1 of 2 , Jan 24, 2005
    • 0 Attachment
      omer mussaev <eomer_mussaev@...> writes:

      > For the first time, I had seen following use (or
      > abuse) of C syntax:
      >
      > Instead of declaring pointer to functions as:
      >
      > typedef int (*pfunction_t)(int arg) ;
      > pfunction_t pfunc = aFunction ;
      >
      > the code I saw uses
      >
      > typedef int function_t (int arg) ;
      >
      > and then uses
      >
      > function_t *pfunc = aFunction ;

      Looks legal to me, though I have not checked the appropriate
      Testaments.

      You can also do

      extern int f(void);
      int (*f)(void) = foo;

      Does that bother you? ;-)

      --
      Oleg Goldshmidt | pub@...
    Your message has been successfully submitted and would be delivered to recipients shortly.