Probably you are looking for
info b
(which is short for info breakpoints) and gives the number in the first "column".
If you want to break when the variable gets modified, use a watch point instead. GDB will always break at the nearest executable code line after the breakpoint (if set by line). A variable declaration isn't executable code and therefore the assignment on the next (non-empty) line will be used.
If what you are looking for is to know at exactly which line it stops, I think there is no such thing on the GDB prompt. However, you can still use a watch point and customize what happens on your break and watch points using commands.
From the comment skwllsp wrote, here's how it would look:
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x0000000000400547 in main(int, char**) at main.cpp:2
Which says there is one breakpoint (1), which is enabled and it shows you the line, too. Disposition (Disp) and enabled (Enb) are useful, but please read the manual for a proper description. I can also warmly recommend the book "Art of Debugging" from Nostarch.