You have to put thee three SDL_GL_SetAttributes before the context creation for them to be taken into account. Actually you create a GL context with default parameters, which is surely a forward compatible context.
This brings up another question, is the context supposed to be created before or after the creation of the window? It crashes at runtime when I try to create the context first. According to the sdl_video.h header, SDL_GL_SetAttribute should be used before window creation.