tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: discussion seeked for c++ variants in USE_LANGUAGES



Le 11/11/15 11:04, Joerg Sonnenberger a écrit :
>> BTW, as I mentioned earlier, I believe too that we should consider explicitly 
>> set the defaults for 'c' and 'c++' to -std=gnu89 and -std=gnu++98 respectfully 
>> as the compiler defaults changed recently, at least they have for gcc5.
>> This, naturally, to avoid surprises to the pkgsrc community having a wide variety of compilers in use.
> 
> Please don't, it breaks more things than it helps. It is technically
> even incorrect, as the default used to be c++03 more orless.
>

noted.
 
>>>> Having both c++11 and c++14 means that they are simply available to packages that
>>>> need them, not necessarily to enforce using them. That said, I have no 
>>>> personal need requiring it now, it was mainly for completeness.
>>>
>>> I really don't understand what that means in practice in terms of
>>> compiler selection.
>>>
>> This means simply I haven't seen any packages requiring the pkgsrc Makefile
>> to specify -std=c++14 (or gnu++14)... although there are a number of packages
>> setting -std=c++11 (or gnu++11) so as far as pkgsrc is concerned, I believe it 
>> to be a moot issue and finally probably best not to add it at the moment.
> 
> C++14 is a refinement of C++11 and there are few reasons so far to force
> it, especially given that Microsoft is just catching up with C++11 in VS.
> 

I'm preparing a new patchset with the following:

all: 	 removing c++14

gcc.mk:	 relaxing GCC_REQD from 4.9 to 4.7 for c11 
   	 (finally, I can't see removing  GCC_REQD for the moment, as -std=c11
	  isn't supported prior to 4.7)

Again, I'd like to update clang.mk making c99, c11 and c++11 use the same -std=gnu* as gcc.mk.  I wonder if perhaps adding -Wpedantic is worthwhile.

It would be trivial to add, if deemed usefule, a package settable variable such as GCC_STRICT_ANSI to force -std={c99,c11,c++11} instead of the gnu 
extension variant.

would this be acceptable?
-- 
Richard PALO



Home | Main Index | Thread Index | Old Index