This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LTO detects violations of one-definition-rule ?


Like this (https://gcc.gnu.org/ml/gcc-testresults/2014-09/msg01374.html):

/home/toon/compilers/trunk/gcc/tlink.c:62:16: error: type 'struct file_hash_entry' violates one definition rule [-Werror=odr]
 typedef struct file_hash_entry
                ^
/home/toon/compilers/trunk/libcpp/files.c:143:8: note: a different type is defined in another translation unit
 struct file_hash_entry
        ^
/home/toon/compilers/trunk/gcc/tlink.c:64:15: note: the first difference of corresponding definitions is field 'key'
   const char *key;
               ^
/home/toon/compilers/trunk/libcpp/files.c:145:27: note: a field with different name is defined in another translation unit
   struct file_hash_entry *next;
                           ^

--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]