Re: [wwwdocs] gcc-8/changes.html additions
On Sat, 7 Apr 2018, Bernd Edlinger wrote: >> I seem to have a writer's block right now, or I would have proposed >> a full alternative, but hope the above gives you an indication? > Thanks for your review! > > I committed the other parts and rewrote this one along your > suggested wording. See attached patch. > > Is it OK? Yours is definitely better than what I failed to come up with yesterday, Bernd. I suggest you change "and the size of the element it points to" to "by the size of the elements it points to" (divide by, and plural for elements) and go ahead and commit. Thanks for your patience. Gerald
Re: [wwwdocs] gcc-8/changes.html additions
On 04/07/18 23:00, Gerald Pfeifer wrote: > On Wed, 4 Apr 2018, Bernd Edlinger wrote: >> Is it OK for wwwdocs? > > Yes, except... > > + -Wsizeof-pointer-div warns for suspicious divisions > + of two sizeof expressions that divide the pointer size by > + the element size, which is the usual way to compute the array size but > > + won't work out correctly with pointers. > > ...this is a bit misleading. > > Dividing the pointer size by the element size is _not_ the usual way; Yes, it is of course the _wrong_ way. This happens usually with macros that are meant to be used with arrays. > using the array size is. I am sure this is what you had in mind, just > the wording is a bit unfortunate. Perhaps "...which looks like the > usual way..." and "the size of a pointer" and "the size of elements > it points to"? And the sizeof expressions do not actually divide > anything.) > > I seem to have a writer's block right now, or I would have proposed > a full alternative, but hope the above gives you an indication? > > > Definitely okay to commit the other parts of this patch, and let's > just work on this item a bit more. > Thanks for your review! I committed the other parts and rewrote this one along your suggested wording. See attached patch. Is it OK? Bernd. Index: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.56 diff -u -r1.56 changes.html --- htdocs/gcc-8/changes.html 7 Apr 2018 21:15:39 - 1.56 +++ htdocs/gcc-8/changes.html 7 Apr 2018 21:24:14 - @@ -287,6 +287,13 @@ by -Wextra. + -Wsizeof-pointer-div warns for suspicious divisions + of the size of a pointer and the size of the element it points to, + which looks like the usual way to compute the array size but + won't work out correctly with pointers. + This warning is enabled by -Wall. + + -Wcast-align=strict warns whenever a pointer is cast such that the required alignment of the target is increased. For example, warn if a char * is cast to an int *
Re: [wwwdocs] gcc-8/changes.html additions
On Wed, 4 Apr 2018, Bernd Edlinger wrote: > Is it OK for wwwdocs? Yes, except... + -Wsizeof-pointer-div warns for suspicious divisions + of two sizeof expressions that divide the pointer size by + the element size, which is the usual way to compute the array size but + won't work out correctly with pointers. ...this is a bit misleading. Dividing the pointer size by the element size is _not_ the usual way; using the array size is. I am sure this is what you had in mind, just the wording is a bit unfortunate. Perhaps "...which looks like the usual way..." and "the size of a pointer" and "the size of elements it points to"? And the sizeof expressions do not actually divide anything.) I seem to have a writer's block right now, or I would have proposed a full alternative, but hope the above gives you an indication? Definitely okay to commit the other parts of this patch, and let's just work on this item a bit more. Thanks, Gerald
Re: [wwwdocs] gcc-8/changes.html additions
On 04/04/18 22:11, Martin Sebor wrote: > On 04/04/2018 12:24 PM, Bernd Edlinger wrote: >> Hi, >> >> this adds a few gcc command line options to gcc-8/changes.html which >> I added for gcc-8. > > Just a couple of suggestions: > > 1) Use to render sizeof in monospace: > > + -Wsizeof-pointer-div warns for suspicious divisions > + of two sizeof expressions that divide the pointer size by the element > > 2) The verb in > > + -fprofile-abs-path create absolute path names... > > should presumably be "creates" in keeping with the descriptive > tone used for the other options. > Done, thanks! Attached is the updated patch. Is it OK for wwwdocs? Bernd. Index: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.52 diff -u -r1.52 changes.html --- htdocs/gcc-8/changes.html 4 Apr 2018 17:43:03 - 1.52 +++ htdocs/gcc-8/changes.html 4 Apr 2018 21:24:15 - @@ -177,6 +177,30 @@ as if, else, while, switch, or for. + + -Wcast-function-type warns when a function pointer + is cast to an incompatible function pointer. This warning is enabled + by -Wextra. + + + -Wsizeof-pointer-div warns for suspicious divisions + of two sizeof expressions that divide the pointer size by + the element size, which is the usual way to compute the array size but + won't work out correctly with pointers. + This warning is enabled by -Wall. + + + -Wcast-align=strict warns whenever a pointer is cast + such that the required alignment of the target is increased. For + example, warn if a char * is cast to an int * + regardless of the target machine. + + + -fprofile-abs-path creates absolute path names in the + .gcno files. This allows gcov to find the + correct sources in projects where compilations occur with different + working directories. + -fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer and signed integer overflow
Re: [wwwdocs] gcc-8/changes.html additions
On 04/04/2018 12:24 PM, Bernd Edlinger wrote: Hi, this adds a few gcc command line options to gcc-8/changes.html which I added for gcc-8. Just a couple of suggestions: 1) Use to render sizeof in monospace: + -Wsizeof-pointer-div warns for suspicious divisions + of two sizeof expressions that divide the pointer size by the element 2) The verb in + -fprofile-abs-path create absolute path names... should presumably be "creates" in keeping with the descriptive tone used for the other options. Martin
Re: [wwwdocs] gcc-8/changes.html additions
On Wed, 4 Apr 2018, Jakub Jelinek wrote: > Following patch documents store merging improvements, > -fsanitize=builtin, -fsanitize=pointer-overflow and C++2A progress. This is the week of release notes updates, it seems? :-) > +The undefined behavior sanitizer gained two new options included in > +-fsanitize=undefined: -fsanitize=builtin which > +diagnoses at runtime invalid arguments to __builtin_clz or I always end up looking it myself: codingconventions.html says to use "run time" as the noun. > +__builtin_ctz prefixed builtins, and > +-fsanitize=pointer-overflow which performs cheap runtime > +tests for pointer wrapping. And that one as well. (I think, unless we consider it an adjective in which case it would be "run-time".) > +For a full list of new features, > +see https://gcc.gnu.org/projects/cxx-status.html#cxx2a;>the C++ > +status page. For this page (changes.html) I _think_ relative links should work. Okay with those changes (and the one I saw Martin suggest). Thanks! Gerald
[wwwdocs] gcc-8/changes.html additions
Hi, this adds a few gcc command line options to gcc-8/changes.html which I added for gcc-8. I have validated as XHTML 1.0 Transitional. Is it OK for wwwdocs? Thanks Bernd. ? patch-changes.diff Index: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.51 diff -u -r1.51 changes.html --- htdocs/gcc-8/changes.html 3 Apr 2018 06:52:04 - 1.51 +++ htdocs/gcc-8/changes.html 4 Apr 2018 18:10:12 - @@ -177,6 +177,29 @@ as if, else, while, switch, or for. + + -Wcast-function-type warns when a function pointer + is cast to an incompatible function pointer. This warning is enabled + by -Wextra. + + + -Wsizeof-pointer-div warns for suspicious divisions + of two sizeof expressions that divide the pointer size by the element + size, which is the usual way to compute the array size but won't work + out correctly with pointers. + This warning is enabled by -Wall. + + + -Wcast-align=strict warns whenever a pointer is cast + such that the required alignment of the target is increased. For + example, warn if a char * is cast to an int * + regardless of the target machine. + + + -fprofile-abs-path create absolute path names in the + .gcno files. This allows gcov to find the correct + sources in projects where compilations occur with different working directories. + -fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer and signed integer overflow
Re: [wwwdocs] gcc-8/changes.html additions
On 04/04/2018 01:43 AM, Jakub Jelinek wrote: Hi! Following patch documents store merging improvements, -fsanitize=builtin, -fsanitize=pointer-overflow and C++2A progress. Ok for wwwdocs? --- changes.html3 Apr 2018 06:52:04 - 1.51 +++ changes.html4 Apr 2018 07:41:06 - @@ -113,6 +113,21 @@ a work-in-progress. possible for the user to have a finer-grained control over the loop unrolling optimization. + +The store merging pass has been enhanced to handle bitfields and not Just a minor nit: I believe the established spelling is bit-fields (as you used in the last hunk below). Martin +just constant stores, but also data copying from adjacent memory +locations into other adjacent memory locations, including bitwise +logical operations on the data. The pass can also handle byte swapping +into memory locations. + + +The undefined behavior sanitizer gained two new options included in +-fsanitize=undefined: -fsanitize=builtin which +diagnoses at runtime invalid arguments to __builtin_clz or +__builtin_ctz prefixed builtins, and +-fsanitize=pointer-overflow which performs cheap runtime +tests for pointer wrapping. + @@ -187,7 +202,17 @@ a work-in-progress. C++ - + +The C++ front end has experimental support for some of the upcoming C++2a +draft features with the -std=c++2a or -std=gnu++2a +flags, including designated initializers, default member initializers for +bit-fields, __VA_OPT__ (except that +#__VA_OPT__ is unsupported), lambda [=, this] +captures, etc. +For a full list of new features, +see https://gcc.gnu.org/projects/cxx-status.html#cxx2a;>the C++ +status page. + Fortran Jakub
[wwwdocs] gcc-8/changes.html additions
Hi! Following patch documents store merging improvements, -fsanitize=builtin, -fsanitize=pointer-overflow and C++2A progress. Ok for wwwdocs? --- changes.html3 Apr 2018 06:52:04 - 1.51 +++ changes.html4 Apr 2018 07:41:06 - @@ -113,6 +113,21 @@ a work-in-progress. possible for the user to have a finer-grained control over the loop unrolling optimization. + +The store merging pass has been enhanced to handle bitfields and not +just constant stores, but also data copying from adjacent memory +locations into other adjacent memory locations, including bitwise +logical operations on the data. The pass can also handle byte swapping +into memory locations. + + +The undefined behavior sanitizer gained two new options included in +-fsanitize=undefined: -fsanitize=builtin which +diagnoses at runtime invalid arguments to __builtin_clz or +__builtin_ctz prefixed builtins, and +-fsanitize=pointer-overflow which performs cheap runtime +tests for pointer wrapping. + @@ -187,7 +202,17 @@ a work-in-progress. C++ - + +The C++ front end has experimental support for some of the upcoming C++2a +draft features with the -std=c++2a or -std=gnu++2a +flags, including designated initializers, default member initializers for +bit-fields, __VA_OPT__ (except that +#__VA_OPT__ is unsupported), lambda [=, this] +captures, etc. +For a full list of new features, +see https://gcc.gnu.org/projects/cxx-status.html#cxx2a;>the C++ +status page. + Fortran Jakub