[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-11-23 Thread sb
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290


User sb changed the following:

What|Old value |New value

  Status|VERIFIED  |CLOSED





--- Additional comments from s...@openoffice.org Tue Nov 23 08:32:04 + 
2010 ---
.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-11-02 Thread sb
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290


User sb changed the following:

What|Old value |New value

  Status|RESOLVED  |VERIFIED





--- Additional comments from s...@openoffice.org Tue Nov  2 09:21:19 + 
2010 ---
.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-10-28 Thread sb
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290


User sb changed the following:

What|Old value |New value

  Status|STARTED   |RESOLVED

  Resolution|  |FIXED





--- Additional comments from s...@openoffice.org Thu Oct 28 15:14:16 + 
2010 ---
Neither C99 __func__ nor GCC __FUNCTION__/__PRETTY_FUNCTION__ expand to string
literals (that can be concatenated with other string literals in the definition
of OSL_LOG_PREFIX; see
),
so all this does not work at all, anyway.

Fixed as ,
reducing OSL_THIS_FUNC to "".

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-09-09 Thread sb
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290


User sb changed the following:

What|Old value |New value

  Status|NEW   |STARTED

Target milestone|---   |OOo 3.4





--- Additional comments from s...@openoffice.org Thu Sep  9 11:37:07 + 
2010 ---
.

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-09-03 Thread tml
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290





--- Additional comments from t...@openoffice.org Fri Sep  3 12:24:15 + 
2010 ---
(Oops, I meant _MSC_VER , not __MSC_VER .)

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-09-03 Thread vmiklos
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290


User vmiklos changed the following:

What|Old value |New value

  CC|''|'vmiklos'





-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-09-03 Thread tml
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290


User tml changed the following:

What|Old value |New value

Priority|P2|P3





-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org



[porting-issues] [Issue 114290] sal: OSL_THIS_FUNC doesn' t work as intended

2010-09-03 Thread tml
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=114290
 Issue #|114290
 Summary|sal: OSL_THIS_FUNC doesn't work as intended
   Component|porting
 Version|DEV300m87
Platform|All
 URL|
  OS/Version|All
  Status|NEW
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P2
Subcomponent|code
 Assigned to|sb
 Reported by|tml





--- Additional comments from t...@openoffice.org Fri Sep  3 12:17:50 + 
2010 ---
The definition of OSL_THIS_FUNC in sal/inc/osl/diagnose.h looks like this:

#ifdef __func__
#define OSL_THIS_FUNC __func__
#elifdef __PRETTY_FUNCTION__
#define OSL_THIS_FUNC __PRETTY_FUNCTION__
#elifdef __FUNCTION__
#define OSL_THIS_FUNC __FUNCTION__
#else
#define OSL_THIS_FUNC " "
#endif

At first this looks correct. But if you actually try to use OSL_THIS_FUNC you
notice that it always expands to a blank, even with gcc that certainly has
__PRETTY_FUNCTION__.

If you think harder you realize that none of __func__, __PRETTY_FUNCTION__ and
__FUNCTION__ are known to the preprocessor. How could they be... The
preprocessor does not understand C++ or C syntax. These identifiers are not
preprocessor magic macros. They are actual compiler magic constants. (Compare to
__FILE__ which *is* a preprocessor magic macro.)

Try running this source file through g++ -E or cl -E:

const char *foo(void) {
#ifdef __PRETTY_FUNCTION__
  return "__PRETTY_FUNCTION__ is OK";
#endif
#ifdef __func__
  return "__func__ is OK";
#endif
#ifdef __FUNCTION__
  return "__FUNCTION__ is OK";
#endif
#ifdef __FILE__
  return "__FILE__ is OK";
#endif
  return 0;
}

The OSL_THIS_FUNC definition probably should check for __GNUC__ and use
__PRETTY_FUNCTION__ in that case, then for __MSC_VER and use __FUNCTION__ in
that case, and otherwise a blank? Or is there a C++ standard way to get the
current function/method being compiled?

-
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

-
To unsubscribe, e-mail: issues-unsubscr...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


-
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org