[aspectc-user] another interesting bug
Leandro Costa
leandro.costa at gmail.com
Tue Dec 2 00:56:54 CET 2008
OK, it seems AspectC++ doesn't accept the expression "using namespace My;"
inside another namespace.
In the following files you will see a namespace "My" and a namespace "Yours"
in the same file.
In the second namespace, I declare class "D" that is a child of class "B",
from de first namespace.
If I put "using namespace My;" inside namespace "Yours", it happens the
following error:
leandro.costa at hydrus:~/personal/aspects/bug> ag++ -c C.cc -a C.ah
C.h:17: error: `B' undeclared here
error: Execution failed: "ac++" --config "/tmp/agxx_pcfgr1FFWf" -a "C.ah"
-p. -c "C.cc" -o "/tmp/C.cc_agxx_2PQSSy"
If I put "using namespace My;" outside of namespace "Yours", it works.
---
leandro.costa at hydrus:~/personal/aspects/bug> more C.h C.cc C.ah
::::::::::::::
C.h
::::::::::::::
#ifndef _C_H_
#define _C_H_
namespace My
{
class B { };
}
//using namespace My; // second try
namespace Yours
{
using namespace My; // first try
class C
{
class D : B { };
};
}
#endif
::::::::::::::
C.cc
::::::::::::::
#include "C.h"
::::::::::::::
C.ah
::::::::::::::
#ifndef _C_AH_
#define _C_AH_
aspect AspC
{
};
#endif
leandro.costa at hydrus:~/personal/aspects/bug> ag++ -c C.cc -a C.ah
C.h:17: error: `B' undeclared here
error: Execution failed: "ac++" --config "/tmp/agxx_pcfgr1FFWf" -a "C.ah"
-p. -c "C.cc" -o "/tmp/C.cc_agxx_2PQSSy"
leandro.costa at hydrus:~/personal/aspects/bug>
--
_____________________________________________
Leandro Souza Costa
"A vitória se encastela em jardins encantadores,
mas para se chegar a ela não há caminho de flores"
_____________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20081201/895c6ecc/attachment.html>
More information about the aspectc-user
mailing list