[Bug c++/38005] inconsistent precedence of operators in namespaces

2008-11-04 Thread c dot hite at rtsgroup dot net
--- Comment #10 from c dot hite at rtsgroup dot net 2008-11-04 17:10 --- So you're saying this isn't a bug because G++ does what it does? Is there no standard specifying what should happen? I would like to think if two different compilers produce different results, one of

[Bug c++/38005] inconsistent precedence of operators in namespaces

2008-11-04 Thread c dot hite at rtsgroup dot net
--- Comment #7 from c dot hite at rtsgroup dot net 2008-11-04 13:36 --- If it stopped at the first match, then the call in C would match the operator in C and say the operands don't match and not compile. Instead C goes on to call an operator defined in A. Why does C check A an

[Bug c++/38005] inconsistent precedence of operators in namespaces

2008-11-04 Thread c dot hite at rtsgroup dot net
--- Comment #5 from c dot hite at rtsgroup dot net 2008-11-04 10:47 --- I'm fine with case #1. I don't know if Sun is wrong, or there is no "right". #2 is a BUG. No, the lookup doesn't stop at "operator<<(Thing&o,Thing&)", it keeps go

[Bug c++/38005] inconsistent precedence of operators in namespaces

2008-11-03 Thread c dot hite at rtsgroup dot net
--- Comment #3 from c dot hite at rtsgroup dot net 2008-11-03 17:51 --- The way in which the compiler finds operators has something is referred to as "Koenig Lookup". -- c dot hite at rtsgroup dot net changed: What|Removed

[Bug c++/38005] inconsistent precedence of operators in namespaces

2008-11-03 Thread c dot hite at rtsgroup dot net
--- Comment #2 from c dot hite at rtsgroup dot net 2008-11-03 17:47 --- Created an attachment (id=16621) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16621&action=view) 2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38005

[Bug c++/38005] inconsistent precedence of operators in namespaces

2008-11-03 Thread c dot hite at rtsgroup dot net
--- Comment #1 from c dot hite at rtsgroup dot net 2008-11-03 17:47 --- Created an attachment (id=16620) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16620&action=view) 1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38005

[Bug c++/38005] New: inconsistent precedence of operators in namespaces

2008-11-03 Thread c dot hite at rtsgroup dot net
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: c dot hite at rtsgroup dot net GCC build triplet: c24d5e9bda8759e6c069ef5eafbb8fe0 GCC host triplet: gcc version 4.2.3 GCC