This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: [PATCH 0/5] Remove a few hurdles of compiling with clang


Simon Marchi <simon.marchi@ericsson.com> writes:

> If somebody is willing to do the work and that it doesn't degrade the code quality,
> we should have no problem accepting it.  So if it's a "side-step" that allows both
> compilers to be happy, that's ok.  As a patch submitter, if you use primarily GCC,
> you are not required to test your patches with Clang, but if you use primarily Clang,
> you must test your patch with GCC (a version that's easily accessible for you).
>
> Does that sound like a good rule?

Yes, it is equivalent to "it is not acceptable to build GDB with
compiler X but break  the build with GCC" in my last email.

I add some comments from Simon and Pedro.  Eli, is it good to you?

 In general, it is good to keep GDB built by different popular compilers,
 so people are easy to build GDB and different warnings from different
 compilers will catch more bugs in GDB.  On the other hand, GCC is still
 the primary compiler to build GDB, and support of other compilers in
 building GDB should not undermine the case that GDB is built by GCC nor
 degrade the code quality.   For example, it is not acceptable to build
 GDB with compiler X but break the build with GCC.  We still must fix
 the GDB build failure with GCC, as what we did in the past, and we
 welcome the contributions to fix the GDB build with other compilers.

 Ideally, every bug that other compilers find in the GDB source code
 that GCC didn't warn about should be considered as a GCC bug, and we
 should make sure that it's reported on the GCC tracker.

I also looked for the place to add this policy.  Looks the most relevant
page is https://sourceware.org/gdb/wiki/Internals%20Compiler-Warnings

-- 
Yao (齐尧)


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