Skip to content

Use __func__ instead of __FUNCTION__ #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions jerry-core/jrt/jrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extern void __noreturn jerry_unimplemented (const char *comment, const char *fil

#ifndef JERRY_NDEBUG
#define JERRY_ASSERT(x) do { if (__builtin_expect (!(x), 0)) { \
jerry_assert_fail (#x, __FILE__, __FUNCTION__, __LINE__); } } while (0)
jerry_assert_fail (#x, __FILE__, __func__, __LINE__); } } while (0)
#else /* !JERRY_NDEBUG */
#define JERRY_ASSERT(x) do { if (false) { (void)(x); } } while (0)
#endif /* !JERRY_NDEBUG */
Expand Down Expand Up @@ -132,19 +132,19 @@ template<typename... values> extern void jerry_ref_unused_variables (const value
#define JERRY_UNREACHABLE() \
do \
{ \
jerry_unreachable (NULL, __FILE__, __FUNCTION__, __LINE__); \
jerry_unreachable (NULL, __FILE__, __func__, __LINE__); \
} while (0)

#define JERRY_UNIMPLEMENTED(comment) \
do \
{ \
jerry_unimplemented (comment, __FILE__, __FUNCTION__, __LINE__); \
jerry_unimplemented (comment, __FILE__, __func__, __LINE__); \
} while (0)

#define JERRY_UNIMPLEMENTED_REF_UNUSED_VARS(comment, ...) \
do \
{ \
jerry_unimplemented (comment, __FILE__, __FUNCTION__, __LINE__); \
jerry_unimplemented (comment, __FILE__, __func__, __LINE__); \
if (false) \
{ \
jerry_ref_unused_variables (0, __VA_ARGS__); \
Expand Down
4 changes: 2 additions & 2 deletions jerry-libc/jerry-libc-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ libc_fatal (const char *msg,

#ifndef LIBC_NDEBUG
# define LIBC_ASSERT(x) do { if (__builtin_expect (!(x), 0)) { \
libc_fatal (#x, __FILE__, __FUNCTION__, __LINE__); } } while (0)
libc_fatal (#x, __FILE__, __func__, __LINE__); } } while (0)
# define LIBC_UNREACHABLE() \
do \
{ \
libc_fatal ("Code is unreachable", __FILE__, __FUNCTION__, __LINE__); \
libc_fatal ("Code is unreachable", __FILE__, __func__, __LINE__); \
} while (0)
#else /* !LIBC_NDEBUG */
# define LIBC_ASSERT(x) do { if (false) { (void) (x); } } while (0)
Expand Down
2 changes: 1 addition & 1 deletion jerry-libc/target/linux/jerry-libc-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ LIBC_UNREACHABLE_STUB_FOR (int raise (int sig_no __attr_unused___))
#define LIBC_EXIT_ON_ERROR(syscall_ret_val) \
if ((syscall_ret_val) < 0) \
{ \
libc_fatal ("Syscall", __FILE__, __FUNCTION__, __LINE__); \
libc_fatal ("Syscall", __FILE__, __func__, __LINE__); \
}

static long int syscall_0 (long int syscall_no);
Expand Down