The 1940 census was the first to stop asking if a veteran had served in the Civil War.    However, it's possible that Civil War veterans might have been enumerated in the 1940 Census. This photograph of Union and Confederate veterans at Gettysburg was taken in 1938, just 2 years before the 1940 count.
{"Image ImageDescription": "Photograph, Union and Confederate veterans shaking hands at 1938 Gettysburg Reunion\nStill Pictures ID number: 111-SC-109197\nRediscovery ID number: 19837\nDTCW Exhibtion ID number: 8.2.8\n18737_2009_001", "Image DateTime": "2010:03:15 10:09:52", "Image Artist": "U.S. National Archives and Records Administration"}