/* Erroneous compiler error message */ int main(void) { int *A = (int *)533 ; float F = 1.F ; A - F ; return 0 ; } /* Results: In function 'main': main_comp_err_msg.c:6:5: erreur: invalid operands to binary - (have 'int *' and 'long double') A-F; ^ Note: The variable F is not of type long double. Microsoft Windows XP Profesional version2002 Service Pack 3. Gcc 4.8.0 win32 mingw32 -std=C99 */
Can't reproduce: h1.c: In function ‘main’: h1.c:5:6: error: invalid operands to binary - (have ‘int *’ and ‘float’) Also, gcc 4.8 is not supported anymore.
Actually this might be reproducible with -m32 on x86_64. The issue is related to the fix for exessive precision.
(In reply to Andrew Pinski from comment #2) > Actually this might be reproducible with -m32 on x86_64. The issue is > related to the fix for exessive precision. Yes, it is. With 6.0, cc1 -m32 -std=c99 on x86_64-linux-gnu.
Thank you for your replty. A.Benaïssa Le Lundi 14 septembre 2015 11h22, mpolacek at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org> a écrit : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67569 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |mpolacek at gcc dot gnu.org Resolution|--- |WORKSFORME --- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Can't reproduce: h1.c: In function ‘main’: h1.c:5:6: error: invalid operands to binary - (have ‘int *’ and ‘float’) Also, gcc 4.8 is not supported anymore.
Thank you. A.Benaïssa Le Lundi 14 septembre 2015 13h27, pinskia at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org> a écrit : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67569 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|WORKSFORME |--- --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Actually this might be reproducible with -m32 on x86_64. The issue is related to the fix for exessive precision.
Maybe instead of: binary_op_error (&richloc, code, TREE_TYPE (op0), TREE_TYPE (op1)); we should use binary_op_error (&richloc, code, orig_type0, orig_type1); in c-typeck.c