[Bug pch/13675] #including a precompiled header more than once in the same unit fails

2009-05-27 Thread gafunchal at gmail dot com


--- Comment #19 from gafunchal at gmail dot com  2009-05-27 10:56 ---
(In reply to comment #18)
> Fixed in 4.4.
> 

I still have this bug on 4.4.0, when using pch and -g3.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13675



[Bug pch/40272] New: error using precompiled headers with extra debug info (-g3)

2009-05-27 Thread gafunchal at gmail dot com
+++ This bug was initially created as a clone of Bug #13675 +++

The error occurs when using a precompiled header which was compiled with -g3.
It works with -g2. The error message is "file number 2 already allocated".

This was first reported at Bug #13675 comment #16 by lukas, but it seems to me
that this bug is unrelated to that one, so I'm reporting it again here.

This is how to reproduce it:

$ cat header1.h
$ cat header2.h
#include "header1.h"
$ cat test.cpp
#include "header2.h"
main() {}
$ g++ -c -g3 -o header1.h.gch header1.h
$ g++ -c -g3 test.cpp
/tmp/ccPfw5P5.s: Assembler messages:
/tmp/ccPfw5P5.s:445: Error: file number 2 already allocated

-v reports the following:

GNU C++ (GCC) version 4.4.0 (x86_64-unknown-linux-gnu) compiled by GNU C
version 4.4.0, GMP version 4.1.4, MPFR version 2.3.2.
GNU assembler version 2.19 (x86_64-unknown-linux-gnu) using BFD version (GNU
Binutils) 2.19
/tmp/ccfJxSqk.s: Assembler messages:
/tmp/ccfJxSqk.s:445: Error: file number 2 already allocated


-- 
   Summary: error using precompiled headers with extra debug info (-
g3)
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pch
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gafunchal at gmail dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40272



[Bug pch/40272] error using precompiled headers with extra debug info (-g3)

2009-05-27 Thread gafunchal at gmail dot com


--- Comment #2 from gafunchal at gmail dot com  2009-05-27 14:25 ---
(In reply to comment #1)
> You have to include a precompiled header from the toplevel source file as the
> very first thing or preferably via the -include command-line parameter.
> 

I do not agree with that. The documentation section 3.20 says:

   * A precompiled header can't be used once the first C token is seen.
 You can have preprocessor directives before a precompiled header;
 you can even include a precompiled header from inside another
 header, so long as there are no C tokens before the `#include'.

Please at least read what I'm saying before closing the bug as "invalid", the
error shows only when using -g3 so it's clearly NOT a matter of
"order-of-things".


-- 

gafunchal at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40272



[Bug pch/13675] #including a precompiled header more than once in the same unit fails

2009-05-27 Thread gafunchal at gmail dot com


--- Comment #20 from gafunchal at gmail dot com  2009-05-27 14:34 ---
For the problem reported on Comment #16, see Bug #40272.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13675



[Bug c++/59151] New: gcc name lookup for friend template finds class outside of

2013-11-16 Thread gafunchal at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59151

Bug ID: 59151
   Summary: gcc name lookup for friend template finds class
outside of
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gafunchal at gmail dot com

template
class Class1;

namespace B {
  template
  class Class2 {
template
friend class Class1;
  private:
int something_private;
  };
}

template
class Class1
{
  void error() {
B::Class2 b;
b.something_private = 42;
  }
};

I orignally thought this to be a clang bug, it seems to actually be a problem
in gcc incorrectly accepting this code.

Richard Smith mentions in http://llvm.org/bugs/show_bug.cgi?id=17950:

--8<--

7.3.1.2/3:

"If the name in a friend declaration is neither qualified nor a template-id and
the declaration is a function or an elaborated-type-specifier, the lookup to
determine whether the entity has been previously declared shall not consider
any scopes outside the innermost enclosing namespace."

Therefore a (not-yet-declared) 'template class B::Class1;' is
befriended, not the global Class1.

-->8--

So gcc should require replacing the friend declaration by:

template
friend class ::Class1;


[Bug c++/33558] 'mutable' incorrectly accepted on reference members

2010-01-09 Thread gafunchal at gmail dot com


--- Comment #2 from gafunchal at gmail dot com  2010-01-09 14:18 ---
Created an attachment (id=19523)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19523&action=view)
patch


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558



[Bug c++/33558] 'mutable' incorrectly accepted on reference members

2010-01-09 Thread gafunchal at gmail dot com


--- Comment #3 from gafunchal at gmail dot com  2010-01-09 14:18 ---
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00420.html

-- Giovanni


-- 

gafunchal at gmail dot com changed:

   What|Removed |Added

 CC||gafunchal at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558