Probably nothing, at this point Gaster has had several reason's to believe that he does not exist in the future, like Papyrus' visions of the future.



There's also the conversation earlier about 'we need railings for the core in case someone falls in'. Gaster may have figured out what would happen if someone did fall in, which also would explain why no one remembers anyone ever having done that.



In short, he is probably only aware that he will be erased from existence soon.