Re: [petsc-dev] Request for comments: allow C99 internally

2020-03-07 Thread Satish Balay via petsc-dev
On Sat, 7 Mar 2020, Jed Brown wrote: > Satish Balay writes: > > > On Fri, 6 Mar 2020, Jed Brown wrote: > >> PetscInt some,several,variables; > >> > >> // code > >> if (PetscDefined(HAVE_MAGIC)) { > >> function(several,); > >> } > >> use(some,variables); > > > > One minor issue:

Re: [petsc-dev] Request for comments: allow C99 internally

2020-03-07 Thread Jed Brown
Satish Balay writes: >> +1 for the for-loop declarations. >> >> No more need to police the use of // C++-style comments? > > I think the objection was more about the code style. Mixing both types of > comments does not look good. I don't have a problem with // for one-line comments and /* */

Re: [petsc-dev] Request for comments: allow C99 internally

2020-03-07 Thread Jed Brown
Satish Balay writes: > On Fri, 6 Mar 2020, Jed Brown wrote: >> PetscInt some,several,variables; >> >> // code >> if (PetscDefined(HAVE_MAGIC)) { >> function(several,); >> } >> use(some,variables); > > One minor issue: we haven't yet fixed up clang analyzer build. Likely this >

Re: [petsc-dev] Request for comments: allow C99 internally

2020-03-07 Thread Satish Balay via petsc-dev
On Sat, 7 Mar 2020, Patrick Sanan wrote: > Perhaps naively, I‘d assume that while there may well be someone out there > relying on compilers for which this would be a problem, that same person is > also less likely to be able to upgrade PETSc. > > The benefits seem well worth it. It‘ll make

Re: [petsc-dev] Request for comments: allow C99 internally

2020-03-07 Thread Satish Balay via petsc-dev
On Fri, 6 Mar 2020, Jed Brown wrote: > I have a question for petsc-dev: Do you know anyone who needs to build > PETSc with a compiler that doesn't support variadic macros and for-loop > declarations? (Both of these are in C99 and C++11, and supported by all > tested configurations including

Re: [petsc-dev] Request for comments: allow C99 internally

2020-03-07 Thread Patrick Sanan
Perhaps naively, I‘d assume that while there may well be someone out there relying on compilers for which this would be a problem, that same person is also less likely to be able to upgrade PETSc. The benefits seem well worth it. It‘ll make things just that much easier to work with. +1 for the