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 8512379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:15:52+00:00 2026-06-11T04:15:52+00:00

Is there any guarantees that the functions which differs only by its names (not

  • 0

Is there any guarantees that the functions which differs only by its names (not parameters and return type also) can’t share the same address in C and C++? I don’t see anything about it in the standard.

#include <cassert>

void foo() {}

void bar() {}

int main()
{
    assert(foo != bar);
}
  • 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-11T04:15:53+00:00Added an answer on June 11, 2026 at 4:15 am

    The C++11 standard says

    5.10 Equality operators
    Pointers of the same type (after pointer conversions) can be compared for equality. Two pointers of the same type compare equal if and only if they are both null, both point to the same function, or both represent the same address (3.9.2).

    If you don’t have any pointers to the functions, they just might have the same address, but we wouldn’t know. If you are comparing pointers to two different functions, they must not compare equal.


    One cause for confusion might be that the MSVC compilers are known to combine code for template functions that happen to produce identical machine code for different types (like int and long). This is not compliant.

    However, this is for functions with different signatures, and not exactly what this question is about.

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

Sidebar

Related Questions

The C standard guarantees that size_t is a type that can hold any array
Using UNIX socket APIs on Linux, is there any way to guarantee that I
Is there any way I can set a formatter on models that will convert
I need to recompute quantities in a BOM structure which only guarantees correct quantity
The .NET Framework defines a System.IO.Path.GetTempFileName method, which guarantees that the temporary filename it
Is there any tool that will help detect potential errors like undefined function in
I've got a class with some functions which realistically are just 'helper' methods that
When you perform a left join in TSQL (MSSQL SERVER) is there any guarantee
Is there any functional difference in Python between a try statement and an if
Is there any way in Notepad++ (or even with another tool) to change the

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.