int main() { return (int() & int()); } compile with g++ -O0 -o test main.cpp this compiles with all compilers I know, except GCC 4.8.1
Confirmed.
Yeah, starting with r197315 we warned about it, r198730 fixed that (no warning nor error), and r198842 started reporting error instead on this.
Fixed for 4.8.2/4.9.
Is there a patch to get this working with gcc 4.8.1? How far back into the history will the patch need to reach.
Just search gcc-patches around the date of Comment #3, no? http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00372.html
I will have to patch it up to that point from gcc 4.8.1 to Comment #3, is the main repo git or subversion?
What I should have asked is what revision is gcc 4.8.1 and what revision was the fix put into trunk?
(In reply to Salamanderrake from comment #7) > What I should have asked is what revision is gcc 4.8.1 and what revision was > the fix put into trunk? svn log svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch svn log svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_1_release show that the fix went into the branch at r200836, and the release was at r199525. You can extract the patch from SVN with svn diff -c200836 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch It doesn't depend on anything else since the 4.8.1 release.