Ticket #178 (closed bug: fixed)

Opened 14 months ago

Last modified 13 months ago

__FUNCTION__ needs to be fixed

Reported by: "Rajeev Thakur" <thakur@…> Owned by:
Priority: major Milestone:
Component: mpich2 Keywords:
Cc:

Description

Adding to Trac.


From: owner-mpich2-core@… owner-mpich2-core@… On Behalf Of Dave Goodell Sent: Wednesday, October 01, 2008 8:19 AM To: mpich2-core@… Subject: Re: [mpich2-core] Fwd: [mpich2-maint] #172: multiple definition?

On Oct 1, 2008, at 7:57 AM, Robert Latham wrote:

On Tue, Sep 30, 2008 at 10:13:09PM -0500, William Gropp wrote:

I don't believe FUNCTION is part of the C language; it may be a nonportable gnuism . All instances should be removed before the release. In the MPICH2 code, we define FUNCNAME and FCNAME to provide portable access to the function name.

FUNCTION appears to be supported in a few compilers, but yes, it's not a standard. 'func' is C99 (6.4.2.2 Predefined identifiers). Is that too new for some of the platforms we wish to support?

Sadly it probably is. We have generally been targeting C89 with a few common bugs as our least common denominator. At this stage it's probably a lot safer to assume more of C99 than it was when the project started. However some of the compilers like the Sun compiler and the PGI compilers are broken in various ways wrt C99. If we didn't have the FUNCTION and FCNAME macros already then I'd say that we should just work around it via configure tests and some preprocessor tricks so that func or FUNCTION was just "" on the few broken compilers. But we do have the other macros and that's probably the right route to take here.

-Dave

Attachments

Change History

Changed 14 months ago by Rajeev Thakur

  • id set to 178

This message has 0 attachment(s)

Changed 14 months ago by thakur

  • milestone set to mpich2-1.0.8

Changed 14 months ago by thakur

  • milestone mpich2-1.0.8 deleted

This got added as part of the BG/P patches. I have temporarily changed the DBG_PRINTF macros in adioi.h to use FILE instead of FUNCTION. ROMIO doesn't use the FCNAME or FUNCNAME macros anywhere yet, which would need to be added for the real fix later.

Changed 13 months ago by thakur

  • status changed from new to closed
  • resolution set to fixed

WARNING! You need to either login using OpenID here or enter your email address here before you can create or edit tickets. Otherwise the ticket will get treated as spam. More information on creating tickets can be found here.

Don't forget to add your email address to the cc list to make sure that you get updated of the ticket status.

Add/Change #178 (__FUNCTION__ needs to be fixed)

Author



Change Properties
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.