Re: 3 byte variables [feature request]

2013-06-05 Thread Miles Bader
If you're using C++ and are willing to use gcc (and clang) extensions, you can do a bit better, e.g.: class __attribute__((packed)) int24_t { public: operator int () const { return b; } int24_t (int v) : b (v) {} int24_t () {} private: int b : 24; }; Then an

Re: [google gcc-4_7,gcc-4_8,integration] Add bounds checks to vectorbool

2013-06-04 Thread Miles Bader
Paul Pluzhnikov ppluzhni...@google.com writes: Keying off NDEBUG rather than __OPTIMIZE__ seems like a more consistent approach -- if you want assert()s, then you probably also want these checks. That's a bad idea. NDEBUG (Be really slow unless the user has positively defined this macro,

Re: Fix PR 53743 and other -freorder-blocks-and-partition failures

2013-05-27 Thread Miles Bader
A nitpick: the dragon book was first published 36 years ago... (!) -miles -- “There are moments, Jeeves, when one asks oneself, ‘Do trousers matter?’” “The mood will pass, sir.” [P.G. Wodehouse, The Code Of The Woosters]

Re: GIt Issue

2013-03-26 Thread Miles Bader
Iyer, Balaji V balaji.v.i...@intel.com writes: I tried the following command: git clone http://gcc.gnu.org/git/gcc.git gcc.git Please try the git protocol instead of http: git clone git://gcc.gnu.org/git/gcc.git gcc.git Thanks for your help Markus. Unfortunately, http is the only option

Re: [Patch, fortran, 4.9] Use bool type instead gfc_try

2013-03-22 Thread Miles Bader
N.M. Maclaren n...@cam.ac.uk writes: That is another matter entirely. The code of gcc/gfortran is supposed to be compilable with other compilers, and it is foolish to make unnecessary assumptions by relying on undefined behaviour. The simple facts are that C++ does NOT define bool to be

Re: C++ PATCH: use identifier_p instead of naked TREE_CODE == IDENTIFIER_NODE

2013-03-21 Thread Miles Bader
Gabriel Dos Reis g...@axiomatics.org writes: in the C++ front-end. identifier_p is effectively LANG_IDENTIFIER_CAST except that it returns a typed pointer instead of a boolean value. What's the point of returning a pointer when the name (and apparently, use, judging from the patch) suggest a

Re: C++ PATCH: use identifier_p instead of naked TREE_CODE == IDENTIFIER_NODE

2013-03-21 Thread Miles Bader
Gabriel Dos Reis g...@integrable-solutions.net writes: In many places, we do thinks like: 1. test that we have a identifier. 2. immediately follow that with access to parts of the tree as identifiers, but check again that we really an identifier, etc. There is nothing silly

Re: [PATCH] Fix PR56466

2013-02-27 Thread Miles Bader
Marek Polacek pola...@redhat.com writes: + bool changed = false; + changed |= true; + changed |= true; + changed |= true; + changed |= true; +if (changed) Why do you use |= ...? Isn't it equivalent to just = (which is more clear) for a boolean? Thanks, -miles

Re: [google gcc-4_7] new module grouping method (issue7393058)

2013-02-25 Thread Miles Bader
x...@google.com (Rong Xu) writes: - gcov_unsigned_t is_exported; + gcov_unsigned_t flag;/* bit 0: is_exported, + bit 1: need to include all the auxiliary + modules in use compilation. */ flags? Thanks, -miles --

Re: GCC cannot move address calculation to store+load?

2013-01-18 Thread Miles Bader
Richard Biener richard.guent...@gmail.com writes: Note that combine does not apply because %eax is used multiple times. This also means that for code-size the combining is not a good idea. Though the lea instruction seems rather large, so in fact the code is a fair bit smaller without it,

Re: RFC - Remove support for PCH post 4.8

2012-11-28 Thread Miles Bader
2012/11/29 Gabriel Dos Reis g...@integrable-solutions.net: My understanding from attending the last C++ standards committee is that we are still way far from having something that gets consensus of good enough proposal on modules to coalesce around. We have several proposals, each in various

Re: RFC - Remove support for PCH post 4.8

2012-11-27 Thread Miles Bader
Chris Lattner clatt...@apple.com writes: Clang has fantastic support for PCH... and soon modules. We don't plan to drop PCH support when modules is implemented. Do you have a pointer to the modules proposal clang will implement? Thanks, -miles -- 「寒いね」と話しかければ「寒いね」と答える人のいるあったかさ [俵万智]

Re: RFC - Alternatives to gengtype

2012-11-19 Thread Miles Bader
Basile Starynkevitch bas...@starynkevitch.net writes: PS. LLVM has also a decisive documentation advantage w.r.t. GCC What...? The last time I tried to do something with LLVM, the internals docs were awful (full of not yet written kinda stuff, usually just in the area I was confused about)...

Re: faster random number engine

2012-08-31 Thread Miles Bader
Can this replace the current mersenne twister implementation in std:: once the endianness issue, etc, have been worked out? -miles -- Is it true that nothing can be known? If so how do we know this? -Woody Allen

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Miles Bader
Mike Stump mikest...@comcast.net writes: Constructors are allowed, but PODs are often passed more efficiently. That property seemed particularly important for double_int. Show us the difference in timing. Show us the generated code. I can't imagine that it could ever matter. I'm also

Re: [cxx-conversion] Make double_int a class with methods and operators. (issue6443093)

2012-08-08 Thread Miles Bader
Richard Guenther richard.guent...@gmail.com writes: Constructors are allowed, but PODs are often passed more efficiently. That property seemed particularly important for double_int. Show us the difference in timing. Show us the generated code. I can't imagine that it could ever matter.

Re: [PATCH][2/n] Allow anonymous SSA names, a bunch of new predicates for SSA names

2012-08-03 Thread Miles Bader
Michael Matz m...@suse.de writes: Bikeshedding: please settle on consistent naming, either IS, or HAS or _P. (FWIW, I suggest _P). IS and HAS have different meanings... -miles -- People who are more than casually interested in computers should have at least some idea of what the underlying

Re: Allow use of ranges in copyright notices

2012-07-02 Thread Miles Bader
Robert Dewar de...@adacore.com writes: On 7/2/2012 8:35 AM, Alexandre Oliva wrote: On Jun 30, 2012, David Edelsohn dje@gmail.com wrote: IBM's policy specifies a comma: first year, last year and not a dash range. But this notation already means something else in our source tree. I

Re: [wwwdocs] Update coding conventions for C++

2012-06-26 Thread Miles Bader
Magnus Fromreide ma...@lysator.liu.se writes: Two spaces for members is common practice with GNU, and it seems to be used for libstdc++. One space for protection labels is not something I have heard of before and libstdc++ uses no indentation for them. A freshly started emacs also doesn't

Re: Renaming Stage 1 and Stage 3

2012-06-11 Thread Miles Bader
Richard Guenther richard.guent...@gmail.com writes: why not give them names with an actual meaning? Development Stage and Stabilizing Stage? I realize those are rather long names, but you can always put short forms in tables, like Dev Stage and Stab Stage. The latter is when the knives come

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-27 Thread Miles Bader
Gabriel Dos Reis g...@integrable-solutions.net writes: if this coding standard is going to be adopted as a GNU coding convention, then you have to be flexible and allow yourself to see beyond the past written in C. You have to ask yourself: how do I want the codebase to look like in 10, 15,

Re: How to compare two text files? Using sed, cmp, diff, tr?

2012-05-26 Thread Miles Bader
Joern Rennecke amyl...@spamcop.net writes: Some platforms need b for fopen, others reject it. Hmm, really? b seems to standard in ISO-C (and widely used in programs aiming for portability)... -miles -- Bore, n. A person who talks when you wish him to listen.

Re: [cxx-conversion] New Hash Table (issue6244048)

2012-05-25 Thread Miles Bader
NightStrike nightstr...@gmail.com writes: You wouldn't use the GNU C Coding conventions to write in tcl, and you shouldn't use them to write in C++. You should just create the GNU C++ Coding Standards new, and not base them off of the former. ... r, just use some common sense, and change

Re: [Patch / RFC] Improving more locations for binary expressions

2012-05-09 Thread Miles Bader
Paolo Carlini paolo.carl...@oracle.com writes: in case my message ends up garbled, the carets do not point to (column 13), two times point to b (column 20), which is obviously wrong. In other terms, all the columns are 20, all wrong. The new caret support does seem to have revealed a bunch of

Re: Should gcc give warning for this case?

2012-04-29 Thread Miles Bader
Qun-Ying zhu.quny...@gmail.com writes: No warning at all. Should gcc warn about the *next pointer points to an unknown structure? I know it is allow by the standard, but most of the case, it indicates some error in the code. Hmm? Where do you expect to warn? You never dereference the

Re: Announce - Thread safety annotations no longer supported in GCC

2012-04-19 Thread Miles Bader
Delesley Hutchins deles...@google.com writes: I can give you detailed technical reasons why GIMPLE was not working for us if you like, but I'm not sure it would be all that constructive. Why wouldn't it be constructive? Even if it's impractical for gcc to change to the degree needed to fit

Re: Switching to C++ by default in 4.8

2012-04-12 Thread Miles Bader
Ian Lance Taylor i...@google.com writes: And GCC usually has better diagnostic than clang except in those few areas which it does not (those some might say those areas are the most important ones). No. clang's diagnostics for C++ are much much better than GCC's. Obviously GCC's can improve,

Re: RFC: -Wall by default

2012-04-12 Thread Miles Bader
Robert Dewar de...@adacore.com writes: I've got a radically different experience here, real bugs were introduced while trying to remove this warning, and as far as I can tell, I've never found any bugs involving precedence of and || -- in the code I'm working on --, whose precedence is really

Re: RFC: -Wall by default

2012-04-10 Thread Miles Bader
2012年4月10日15:26 Eric Botcazou ebotca...@adacore.com: Something like -Wdefault-warnings is a reasonable choice, for the reasons already mentioned in this sub-thread. Purists will find that -Wdefault-warnings is redundant though, since -W is supposed to mean warning already, e.g. it's -Wall and

Re: RFC: -Wall by default

2012-04-10 Thread Miles Bader
Andrew Haley a...@redhat.com writes: The argument is that we should enable the warnings by default because it makes gcc more competitive. But that only makes gcc more competitive if enabling these kinds of warnings by default is an advantage. However, we haven't established that -Wall by

Re: Switching to C++ by default in 4.8

2012-04-10 Thread Miles Bader
Torvald Riegel trie...@redhat.com writes: I hate to bring this up, but in my personal experience, getting started with LLVM was _much_ easier than with GCC. LLVM is a much newer codebase, so that's an advantage unrelated to the language. I dunno, I've some experience with LLVM as well, and I

Re: RFC: -Wall by default

2012-04-07 Thread Miles Bader
James Cloos cl...@jhcloos.com writes: GDR Exactly. Our bugzilla databases has lot of requests in this spirit. If that is so, then defaulting to -Wall will just generate even more requests to turn that off. You may well imagine. However, it isn't known. Turning it on by default, at least

Re: RFC: -Wall by default

2012-04-07 Thread Miles Bader
Dave Korn dave.korn.cyg...@gmail.com writes: IMHO we should move the -Wunused ones into -Wextra if we're going to turn on -Wall by default. The rest seem pretty reasonable defaults to me. How about instead adding new -Wstandard, which will be on by default, and keeping -Wall / -Wextra the

Re: RFC: -Wall by default

2012-04-04 Thread Miles Bader
domi...@lps.ens.fr (Dominique Dhumieres) writes: PS -Wall is a simple enough option to be remembered by all users who need it As is -Wno-all, of course. (if they don't use it, they don't want it). That isn't necessarily the case. In my experience, there seem to be a lot of developers who

Re: RFC: -Wall by default

2012-04-04 Thread Miles Bader
Robert Dewar de...@adacore.com writes: We have run into people running benchmarks where they were specifically prohibited from using other than the default options, and gcc fared badly in such comparisons. Yeah, there was the silly benchmark at phoronix where they came to the conclusion that

Re: RFC: -Wall by default

2012-04-04 Thread Miles Bader
Miles Bader mi...@gnu.org writes: For instance, how about adding -Wall to the default options now, and then re-evaluate the issue based on any complaints that come in from people using snapshots? That's hardly a perfect method, as the sort of people who run compiler snapshots are maybe

Re: bug#11034: Binutils, GDB, GCC and Automake's 'cygnus' option

2012-04-03 Thread Miles Bader
Pedro Alves pal...@redhat.com writes: OK, you've all made clear you have your sensible reasons to have the '.info' ... it available only though the new, undocumented option named (literally) hack!info-in-builddir. I hope this is acceptable to you. ... *undocumented* option

Re: Switching to C++ by default in 4.8

2012-04-03 Thread Miles Bader
Ian Lance Taylor i...@google.com writes: What is the earliest release of G++ that will allow GCC to bootstrap? Another thing that is worth testing. Right now I would anticipate that even fairly old releases of G++ can bootstrap GCC. However, we will need to decide what old release we want

Re: gcc extensibility

2012-03-30 Thread Miles Bader
Bernd Schmidt ber...@codesourcery.com writes: No, that means would be using the old tool named 'patch' before building GCC. Or even the new tool named 'git'. [... and note that git apply doesn't actually require a git repo, and is a great (generally rather better behaved) replacement for the

Re: Proposed plugin API for GCC

2012-03-29 Thread Miles Bader
David Malcolm dmalc...@redhat.com writes: I initially attempted an underscore_based_naming_convention but quickly found it difficult to get concise function names, so I switched to a CamelCaseBased_NamingConvention with an underscore separating a notional namespace element from a secondary

Re: Is it a bug when use “”if the operator is out of the size 0~63

2012-02-24 Thread Miles Bader
Yang Yueming yueming.y...@huawei.com writes: long long abc = 0x01234567891abcde; long long xyz; ... xyz = abc 65; ... The result of xyz should be 0,but it is 2468acf123579bc ,same as xyz = abc 1,Why? Because the shift operators in C have an undefined result when the shift-count is

Re: Dealing with compilers that pretend to be GCC

2012-02-02 Thread Miles Bader
ludovic.cour...@inria.fr (Ludovic Courtès) writes: Rather than assertions, one could use predicates: #if #has_builtin(foo) #has_attribute(bar) ... #endif The difference being that (1) predicates were designed specifically for this purpose, and (2) there’s no magic involved. but ...

Re: expected '=', ',', ';', 'asm' or '__attribute__' before 'foo'

2012-01-29 Thread Miles Bader
Chris Lattner clatt...@apple.com writes: Int foo (void) { return 1; } A message like error: expected '=', ',', ';', 'asm' or '__attribute__' before 'foo' is just pain to the eyes, and apart from that it is not more helpful than a simple syntax error before 'foo': FWIW, Clang produces:

Re: why GCC does implicit promotion to unsigned char?

2012-01-26 Thread Miles Bader
Konstantin Vladimirov konstantin.vladimi...@gmail.com writes: It looks really weird. Why gcc promotes char to unsigned char internally? Hmm, maybe not useful, but if you used unsigned char as the variable types or the -funsigned-char command-line option, it won't ('cause the variables will

Re: Dealing with compilers that pretend to be GCC

2012-01-21 Thread Miles Bader
Chris Lattner clatt...@apple.com writes: Why not just implement the clang feature checking macros? http://clang.llvm.org/docs/LanguageExtensions.html#feature_check Yes, please. [Hopefully with a smidgen of cooperation regarding the actual feature names...] -miles -- Dawn, n. When men of

Re: C Compiler benchmark: gcc 4.6.3 vs. Intel v11 and others

2012-01-19 Thread Miles Bader
willus.com willus@willus.com writes: For the math functions, this is normally more a libc feature, so you might get very different results on different OS. Then again, by using -ffast-math, you allow the math functions to return any random value, so I can think of ways to make it even

Re: non-virtual-destructor warnings redux

2011-12-24 Thread Miles Bader
2011/12/24 Jonathan Wakely jwakely@gmail.com: On 24 December 2011 10:50, Paolo Carlini wrote: On 12/24/2011 03:04 AM, Miles Bader wrote: What do people think... is this a better non-virtual-dtor warning? First of all I'd check http://gcc.gnu.org/gcc-4.7/changes.html#cxx and see that I

Re: gcc-4.7-20111224 is now available

2011-12-24 Thread Miles Bader
gccad...@gcc.gnu.org writes: Snapshot gcc-4.7-20111224 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.7-20111224/ oooh a christmas present! merry xmas~ -miles -- 「寒いね」と話しかければ「寒いね」と答える人のいるあったかさ [俵万智]

NSDMI bug?

2011-12-23 Thread Miles Bader
Is the following code valid? #include tuple struct X { std::tupleint,int tt{1, 2}; // works }; struct Y { std::tupleint,int tt = std::tupleint,int{1, 2}; // *error* }; 'cause it results in an error with gcc 20111210: $ g++-snapshot -c -std=c++11 nsdmi2.cc

Re: NSDMI bug?

2011-12-23 Thread Miles Bader
k, bugzilla'd thanks, -miles -- Cat is power.  Cat is peace.

non-virtual-destructor warnings redux

2011-12-23 Thread Miles Bader
gcc seems to have had a succession of warnings about non-virtual- destructors-in-classes-with-virtual-methods, none of which really worked all that well in practice (and so none are enabled by default, even by -Wall or -Wextra). But I notice clang has a variant which seems pretty well-behaved on

Re: warn about deprecated access declarations

2011-12-12 Thread Miles Bader
Jonathan Wakely jwakely@gmail.com writes: How about ...; suggest adding the using keyword? That sounds like the compiler is suggesting that the user suggests doing that! It is similar to suggest parentheses Good point, that's not correct English either, but it would be consistent.

Re: Suspicion of regression in uninitialized value detection

2011-12-07 Thread Miles Bader
Robert Dewar de...@adacore.com writes: The worst thing for me about -O1 is arguments disappearing in the trace back, that's really a deal breaker. Wasn't Alexandre Oliva's VTA work supposed to help this kind of thing...? Did that ever get merged? -miles -- Joy, n. An emotion variously

Re: Implement C1X _Alignas, _Alignof, max_align_t, stdalign.h

2011-12-05 Thread Miles Bader
BTW, is there a reason that C1X _Alignas is supported, but not C++11 alignas? Is the latter harder? Thanks, -Miles -- Generous, adj. Originally this word meant noble by birth and was rightly applied to a great multitude of persons. It now means noble by nature and is taking a bit of a rest.

Re: Delegating Constructors?

2011-11-11 Thread Miles Bader
Jason Merrill ja...@redhat.com writes: Hmm, has he been contacted recently? The original patch was from ages ago... Yes, I've been in communication with him and the FSF. I expect this to be sorted out soon so we can put in the patch. Cool, thanks! -miles -- Cynic, n. A blackguard whose

Re: [C++11] Reclaiming fixed-point suffixes for user-defined literals.

2011-11-09 Thread Miles Bader
David Brown da...@westcontrol.com writes: If the compiler can generate fractional arithmetic code directly from such expressions, then it is indeed a good step towards implementing such types as a pure C++ class without needing to use compiler extensions. ... I am not saying the compiler

Delegating Constructors?

2011-11-06 Thread Miles Bader
Hi, I'm wondering whether there's been any progress on the recent Delegating Constructors patch: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01202.html The last post on that thread (in gcc-patches) was early last month. There doesn't seem to have been any objection, just minor review-type

Re: Delegating Constructors?

2011-11-06 Thread Miles Bader
Ville Voutilainen ville.voutilai...@gmail.com writes: Is this likely to go in for 4.7? As far as I know, all the review comments have been fixed, I posted a patch that fixed the unwanted whitespace changes and such. It's pending copyright paperwork from the author of the original patch. (my

Re: Option to make unsigned-signed conversion always well-defined?

2011-10-07 Thread Miles Bader
2011/10/7 Pedro Pedruzzi pedro.pedru...@gmail.com: It is. For example -100 + -100 = -200 (less than INT8_MIN; does not fit). But -1 + -1 = -2, is ok. Ah, now I see... -miles -- Cat is power.  Cat is peace.

Re: Long-term plan for C++98/C++11 incompatibility

2011-10-07 Thread Miles Bader
FWIW, I seem to have no obvious problems compiling with -std=c++0x, and then linking with system c++ libraries that were presumably compiled using default options (e.g., I use the OpenEXR library, which is C++) So if there are incompatibilities, they don't seem to be fatal... -Miles --

Re: Option to make unsigned-signed conversion always well-defined?

2011-10-06 Thread Miles Bader
Ulf Magnusson ulfali...@gmail.com writes: Might as well do bool overflowbit(unsigned int a, unsigned int b) { const unsigned int sum = a + b; return (a ^ b) ~(a ^ sum) 0x80; } But still not very good output compared to other approaches as expected. How about: bool

Re: Option to make unsigned-signed conversion always well-defined?

2011-10-06 Thread Miles Bader
Pedro Pedruzzi pedro.pedru...@gmail.com writes: On Thu, Oct 6, 2011 at 11:04 AM, Miles Bader mi...@gnu.org wrote: How about: bool overflowbit2(unsigned int a, unsigned int b) { const unsigned int sum = a + b; return ~(a ^ b) sum 0x80; } Miles, it is not the same. Take

Re: Volatile qualification on pointer and data

2011-09-25 Thread Miles Bader
David Brown david.br...@hesbynett.no writes: So what advantages would there be in declaring a volatile buffer like this to be const? At best, you are helping the compiler check that you don't accidentally write to it in your own code. That's actually pretty handy tho... -Miles --

Re: g++ 2.5.2 does not catch reference to local variable error.

2011-08-04 Thread Miles Bader
Jonathan Wakely jwakely@gmail.com writes: g++ -Wall -Wextra ... should flag a warning on the following code but does not. Thanks for the apology, but it should still be reported to bugzilla not to this list. BTW, it should only warn if given -Weffc++, right? -Miles -- People who are

Re: g++ 2.5.2 does not catch reference to local variable error.

2011-08-04 Thread Miles Bader
Jonathan Wakely jwakely@gmail.com writes: No, returning a reference to a local variable is always wrong, not only because Meyers says so. True ... :} -miles -- Apologize, v. To lay the foundation for a future offense.

Re: libgcc: strange optimization

2011-08-02 Thread Miles Bader
Richard Guenther richard.guent...@gmail.com writes: But then can't people use a pure assembler stub instead? Without inlining there isn't much benefit left from writing void f1(int arg) { register int a1 asm(r8) = 10; register int a2 asm(r1) = arg; asm(scall : : r(a1), r(a2));

Re: Assignment Operator Bug

2011-07-07 Thread Miles Bader
Mactavish mdtabisha...@gmail.com writes: I have compiled this code in MS Visual C++ Express 2008 and it works as it should be but when i compile this code in Mingw as a part of GCC ver 4.4.1-2 the input() function should return a temporary object to 'ob' object and invoke the assignment

Re: temporarily giving up using Git for GCC MELT

2011-02-27 Thread Miles Bader
On Sun, Feb 27, 2011 at 11:19 PM, Frank Ch. Eigler f...@redhat.com wrote: Miles Bader mi...@gnu.org writes: Do you use the http: or git: protocol for cloning?  The official gcc git repo only supports the old git http: protocol, which is almost useless on slow/high-latency networks

Re: temporarily giving up using Git for GCC MELT

2011-02-26 Thread Miles Bader
Basile Starynkevitch bas...@starynkevitch.net writes: PS. By the way, git clone-ing the GCC git repository takes a lot of time from Europe. Perhaps having a daily tar ball of the result of that command available by ftp would be very nice Do you use the http: or git: protocol for cloning?

Re: GCC 4.6 performance regressions

2011-02-08 Thread Miles Bader
Jonathan Wakely jwakely@gmail.com writes: Because phoronix uses make -j the compile times are highly random. Don't they know how to use 'time' to measure something more useful? I wouldn't be entirely surprised, last time I looked they didn't seem to know to use --enable-checking=release

Re: Proposal for automatic generation of c++ header files

2011-01-15 Thread Miles Bader
Achilleas Margaritis axil...@gmail.com writes: So, if the compiler checks the code, and the documentation says whatever must be said about the program, headers are completely redundant. I think this is often/usually not true in practice though. It seems _far_ more common for there to be

Re: Committed Go frontend

2010-12-03 Thread Miles Bader
Ian Lance Taylor i...@google.com writes: As I just mentioned on the gcc-patches mailing list, I have just committed the Go frontend to mainline. What's the name of the resulting compiler binary? ggo? -Miles -- Opposition, n. In politics the party that prevents the Goverment from running

Re: new requirement of constexpr for static const float data members is too restrictive

2010-11-30 Thread Miles Bader
On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis g...@integrable-solutions.net wrote: If you are doing that, why don't you write a simpler code by just defining (e.g. initializing) the data member outside the class? 'cause I want the compiler to be able to use (inline) the underlying values.

Re: new requirement of constexpr for static const float data members is too restrictive

2010-11-30 Thread Miles Bader
Gabriel Dos Reis g...@integrable-solutions.net writes: If you are doing that, why don't you write a simpler code by just defining (e.g. initializing) the data member outside the class? 'cause I want the compiler to be able to use (inline) the underlying values. then write even simple code:

Re: new requirement of constexpr for static const float data members is too restrictive

2010-11-30 Thread Miles Bader
Gabriel Dos Reis g...@integrable-solutions.net writes: I.e., I can choose between various types of ugliness -- wrong namespace, funny syntax, or (currently) gcc-dependence.  I used to choose gcc- dependence, but then switched to funny syntax.  In the future when c++0x support is more

Re: new requirement of constexpr for static const float data members is too restrictive

2010-11-30 Thread Miles Bader
Richard Guenther richard.guent...@gmail.com writes: If you are doing that, why don't you write a simpler code by just defining (e.g. initializing) the data member outside the class? 'cause I want the compiler to be able to use (inline) the underlying values. I think it'll do that with

Re: new requirement of constexpr for static const float data members is too restrictive

2010-11-30 Thread Miles Bader
On Tue, Nov 30, 2010 at 11:40 PM, Gabriel Dos Reis g...@integrable-solutions.net wrote: I agree.  I think we have a case here where people will say anything to justify a (mis)feature that leads to brittle codes Why does it lead to brittle codes? If people are worried about multiple

Re: new requirement of constexpr for static const float data members is too restrictive

2010-11-29 Thread Miles Bader
Ian Lance Taylor i...@google.com writes: We could decide not to do anything about this, but I don't think it's a non-issue. With -std=gnu++98 g++ accepts this invalid code. That is, it is a g++ extension, and the code is properly rejected with -pedantic-errors. We could decide to carry the

Re: GFDL/GPL issues

2010-08-15 Thread Miles Bader
Florian Weimer f...@deneb.enyo.de writes: Duplication is how other GNU projects handle this. For instance, many Emacs Lisp functions are documented twice: once as a docstring in the source code (which is roughly equivalent to the comment-in-spec approach), and once in the Elisp reference

Re: GFDL/GPL issues

2010-08-03 Thread Miles Bader
Robert Dewar de...@adacore.com writes: I am actually a bit dubious about automatic extraction of documentation from code. The kind of thing you can get this way is in any case easily obtained by browsing the code. Presumably it saves the effort of browsing the code, which is not a small

Re: GFDL/GPL issues

2010-07-29 Thread Miles Bader
Ian Lance Taylor i...@google.com writes: Please move such unconstructive arguments elsewhere. Wait. Steven's comment was on the snarky side, but coming from a long-time gcc contributor I don't think it was over the line or even near it. I think he was expressing a perfectly valid point of

Re: GFDL/GPL issues

2010-07-26 Thread Miles Bader
Mark Mitchell m...@codesourcery.com writes: I agree that we are likely to get more traction with a request to dual license as opposed to re-license. Well, I've asked -- but RMS shot down that idea. Did he give reasons, and/or indicate any other possible methods to use? -Miles -- `Suppose

Re: C++0x Memory model and gcc

2010-05-11 Thread Miles Bader
Andrew MacLeod amacl...@redhat.com writes: -fmemory-model=single - Enable all data races introductions, as they are today. (relax all 4 internal restrictions.) One could still use this mode with a multi-threaded program as long as explicit synchronization is done, right? -Miles -- Road,

Re: C++0x Memory model and gcc

2010-05-11 Thread Miles Bader
Andrew MacLeod amacl...@redhat.com writes: -fmemory-model=single - Enable all data races introductions, as they are today. (relax all 4 internal restrictions.) One could still use this mode with a multi-threaded program as long as explicit synchronization is done, right? Right. Its

Re: Code assistance with GCC

2010-04-22 Thread Miles Bader
Chris Lattner clatt...@apple.com writes: I did this because the other responses made it seem that it wasn't something that would be accepted back into GCC proper. Maintaining an Can you point at any response that said it would not be accepted back into GCC proper? There were no such

Re: updated code size comparison

2009-12-15 Thread Miles Bader
John Regehr reg...@cs.utah.edu writes: I've updated the code size results here: http://embed.cs.utah.edu/embarrassing/dec_09/ The thing that bothers me about this is that you seem to put a lot of emphasis on the test X generated larger code than Y without any reflection of how much larger

Re: Should -Wjump-misses-init be in -Wall?

2009-06-22 Thread Miles Bader
Gabriel Dos Reis dosr...@gmail.com writes: Historically, many C programmers have resisted that idea (even when we could argue that it really is bad style programming.) They have?(!) This warning warns about: goto L; { int x = 3; L: ... } but not about: goto L; { int x; L: ... }

Re: LLVM as a gcc plugin?

2009-06-04 Thread Miles Bader
Chris Lattner clatt...@apple.com writes: Some time ago, there was a discussion about integrating LLVM and GCC [1]. However, with plugin infrastructure in place, could LLVM be plugged into GCC as an additional optimization plugin? I'd love to see this, but I can't contribute to it directly. I

Re: GCC 4.5: nonconstant array index in initializer error

2009-04-23 Thread Miles Bader
Joe Buck joe.b...@synopsys.com writes: The compiler is not supposed to be pedantic by default. A standards document saying that a diagnostic is required should not be the end of the story, especially when we're talking about important, widely used code bases. Sure, but at least your example

combine register note problem with multi-word values

2005-06-08 Thread Miles Bader
When `try_combine' combines two instructions, it adds the register notes from the old insns to the new combined insn. It also adds new register notes calculated from the new insn's clobbers by `recog_for_combine'. In this process, it (`distribute_notes') suppresses duplicate register notes, but

Re: reload question

2005-06-01 Thread Miles Bader
Ian Lance Taylor ian@airs.com writes: I agree that gcc is not well designed to cope with an accumulator architecture. Reload can't cope. I've had a fair amount of success with the approach I initially posted (perturbing the emission order of reloads based on dependencies between the operand

Re: reload question

2005-03-18 Thread Miles Bader
BTW, if anybody replies, could you keep me in the CC: header? I do read this list, but it won't be convenient in the next few days. Thanks, -Miles -- .Numeric stability is probably not all that important when you're guessing.

Re: reload question

2005-03-17 Thread Miles Bader
Bernd Schmidt [EMAIL PROTECTED] writes: Reload insns aren't themselves reloaded. You should look at the SECONDARY_*_RELOAD_CLASS; they'll probably let you do what you want. Ah, thank you! I've defined SECONDARY_*_RELOAD_CLASS (and PREFERRED_* to try to help things along), and am now running

Re: Merging calls to `abort'

2005-03-15 Thread Miles Bader
Dave Korn [EMAIL PROTECTED] writes: I very strongly feel that this optimisation should be placed under user control rather than just disabled, and that it should remain enabled by default at -Os; but I wouldn't go to the ropes over whether or not it's included in -Os as long as there's a -f

reload question

2005-03-15 Thread Miles Bader
Hi, I'm writing a new gcc port, and having problems making reload work. Say I've got a mov instruction that only works via an accumulator A, and a two-operand add instruction. r regclass includes regs A,X,Y, and a regclass only includes reg A. So mov has constraints like: 0 = g,a 1 = a,gi