Is it necessary to put boundary condition on the varf of rhs?

In the Documentation for the Poisson equation there are the following code snippets:

1 varf a(u,v)
2     = int2d(Th)(
3           dx(u)*dx(v)
4         + dy(u)*dy(v)
5     )
6     + on(C, u=0)
7     ;
8 matrix A = a(Vh, Vh); //stiffness matrix
1 varf l(unused,v)
2     = int2d(Th)(
3           f*v
4     )
5     + on(C, unused=0)
6     ;
7 Vh F;
8 F[] = l(0,Vh); //F[] is the vector associated to the function F

Is it necessary to put the boundary condition on both the bilinear and linear forms? I get the same solution with or without the condition on the rhs.

It depends on the type of Dirichlet boundary value (homogeneous or not) and the tgv value.

I have homogeneous BC and tgv=-1.