On Mon, Jun 01, 2015 at 08:01:53PM +0200, Thomas Koenig wrote: > Am 01.06.2015 um 15:40 schrieb Steve Kargl: > > On Mon, Jun 01, 2015 at 08:34:24AM +0200, Thomas Koenig wrote: > >> What would be the peferred alternative? > > > Is it possible to detect the _knd suffix? > > Yes, this is possible. > > > If so, no > > warning is my preference as it is never incorrect to > > specify more digits than required for conversion from > > ASCII to an internal representation. This, of course, > > assumes that the compiler doesn't have a bug. > > :-) > > >> > > >> > Comments? > >> > > > I'm not a big fan of a proliferation of options. As long > > as the warning isn't triggered under -Wall, I suppose > > I can live with -Wconversion-extra. > > OK, so we have a few options. > > a) Warn for > > print *,3.1415926535897932 with -Wconversion > > and warn for > > print *,3.1415926535_4 only with -Wconversion-extra > > b) Like a) but supply two options to switch off the respective > warnings. > > c) Warn for > > print *,3.1415926535 with -Wconversion-extra > > and don't warn for > > print *,3.141592653589_4 >
This would be my first choice. If a user actually specifies a suffix, I assume that the user has given some thought to the preceding digits. > d) Like now: Warn with -Wconversion-extra for both > > print *,3.1415926535 > > and > > print *,3.14159265358979_4 This would be my second choice. > What are people's prefrences on this? Should we maybe ask on c.l.f > (where we will get more opinions, certainly also differing)? If you ask on c.l.f, you'll get differing opinions and most likely a history lesson on what compilers did 40 years ago and how PL/1 hands the issue. :-) Don't let my person opinion be the sole driver/impediment. I do have a few comments on the patch itself. I'll send those later. -- Steve