I think what you are looking for is section7.4.3
A package is observable if and only if either:
A compilation unit containing a declaration of the package is observable (§7.3).
A subpackage of the package is observable.
The packages java, java.lang, and java.io are always observable.
And in 7.5.2
It is a compile-time error if the named package or type is not accessible (§6.6).
So if nothing is in a package it does not exists and the bug is actually on the side of the Eclipse compiler; it's described in a very old bug report that was left in "LATER" state until eventually that state was deprecated and it was moved to WONT_FIX instead. Feel free to re-open it if you think it's worth fixing (now that the JLS is clarified in this area)