Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8924663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:28:48+00:00 2026-06-15T07:28:48+00:00

C99 6.3.2.1/4 A function designator is an expression that has function type. Except when

  • 0

C99 6.3.2.1/4

A function designator is an expression that has function type. Except
when it is the operand of the sizeof operator or the unary &
operator
, a function designator with type “function returning type”
is converted to an expression that has type “pointer to function
returning type”.

As I understand, this suggests that except when sizeof operator and unary & operator is applied to function; no function to pointer conversion will happen. But from what I’ve seen,

int (*p)(int) = &foo;

or,

int (*p)(int) = foo;

Both seems to work. This shows that both &foo and foo are equivalent. So, where does unary & operator comes in affect if it has effect as seen above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:28:49+00:00Added an answer on June 15, 2026 at 7:28 am

    You somehow understood it backwards. On the contrary, function type automatically decays to function pointer type unless the function identifier is used under sizeof or &.

    Again, under sizeof and & function type does not decay to pointer. In all other cases it decays to pointer type. (This, in turn, leads to the fact that applying sizeof to functions is illegal.)

    The behavior of function types in C mirrors the well-known behavior of array types: unless you use them under sizeof or &, they are immediately and implicitly converted to pointer types.

    This means in your examples expressions &foo and foo are equivalent. In the first case the pointer is produced by the explicit application of &. In the second case, the pointer is produced by the implicit “function type decay” feature. The pointer value is the same in both cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just read that C99 has double_t which should be at least as wide
I have a c99 function that uses openmp, which works as expected. I also
I read in the c99 Standard: -remove implicit function declaration, -remove implicit int. But
Apparently (at least according to gcc -std=c99 ) C99 doesn't support function overloading. The
I use only C99, and, yesterday, I heard that it was impossible to mix
I believe that in C99, modification of string literals is undefined behaviour. I don't
The standard includes macros line _____LINE_____ & _____FILE_____, and C99 adds _____FUNCTION_____ which is
I was just skimming the C99 standard, looking for something that I don't remember
Paragraph 6.7.3.8 of the C99 spec states If the specification of an array type
I've been developing a MathLink application with a function that accepts two lists, e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.