aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-12-20 11:31:50 +0100
committerMartin Liska <mliska@suse.cz>2021-12-20 12:35:28 +0100
commit7424323bd5e1e27d8ffe37257459db5b28af18d2 (patch)
tree063952a7a8f8b1b4f4fa4dda57e8c1e5abefab51 /gcc
parent8d081c0093a42713afd1d4f7f07d09abb6eabc9a (diff)
downloadgcc-7424323bd5e1e27d8ffe37257459db5b28af18d2.zip
gcc-7424323bd5e1e27d8ffe37257459db5b28af18d2.tar.gz
gcc-7424323bd5e1e27d8ffe37257459db5b28af18d2.tar.bz2
jit: Fix -Wodr warning
gcc/jit/libgccjit.c:3957:8: warning: type 'struct version_info' violates the C++ One Definition Rule [-Wodr] ../../gcc/jit/libgccjit.c:3957:8: warning: type 'struct version_info' violates the C++ One Definition Rule [-Wodr] 3957 | struct version_info ../../gcc/tree-ssa-loop-ivopts.c:181: note: a different type is defined in another translation unit 181 | struct version_info gcc/jit/ChangeLog: * libgccjit.c (struct version_info): Rename to jit_version_info. (struct jit_version_info): Likewise. (gcc_jit_version_major): Likewise. (gcc_jit_version_minor): Likewise. (gcc_jit_version_patchlevel): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/jit/libgccjit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
index 5cb27a2..3d2d838 100644
--- a/gcc/jit/libgccjit.c
+++ b/gcc/jit/libgccjit.c
@@ -3954,11 +3954,11 @@ gcc_jit_context_new_rvalue_from_vector (gcc_jit_context *ctxt,
static pthread_mutex_t version_mutex = PTHREAD_MUTEX_INITIALIZER;
-struct version_info
+struct jit_version_info
{
/* Default constructor. Populate via parse_basever,
guarded by version_mutex. */
- version_info ()
+ jit_version_info ()
{
pthread_mutex_lock (&version_mutex);
parse_basever (&major, &minor, &patchlevel);
@@ -3974,21 +3974,21 @@ struct version_info
extern int
gcc_jit_version_major (void)
{
- version_info vi;
+ jit_version_info vi;
return vi.major;
}
extern int
gcc_jit_version_minor (void)
{
- version_info vi;
+ jit_version_info vi;
return vi.minor;
}
extern int
gcc_jit_version_patchlevel (void)
{
- version_info vi;
+ jit_version_info vi;
return vi.patchlevel;
}