Summary: | [meta-bug] The gimplifier shouldn't emit warnings or errors | ||
---|---|---|---|
Product: | gcc | Reporter: | Chris Lattner <sabre> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | egallager, gcc-bugs, gdr, pinskia |
Priority: | P2 | Keywords: | diagnostic, meta-bug |
Version: | unknown | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2006-03-18 16:26:58 | |
Bug Depends on: | 26749, 26747, 26748, 26750, 26751 | ||
Bug Blocks: |
Description
Chris Lattner
2005-10-06 01:29:06 UTC
This needed for some syntaxical analysis, IIRC. The following explains about the C compiler: http://gcc.gnu.org/ml/gcc/2004-05/msg00257.html It is semantical analysis and not syntax. right now if we don't gimplify with -fsyntax-only, we would not be able to diagnostic the following: void f(void) { break; } The gimplifier apparently emits these three errors: error ("memory input %d is not directly addressable", i); error ("invalid lvalue in asm output %d", i); error ("too few arguments to function %<va_start%>"); In an ideal, modular, world, the front-ends should be emitting these. If these checks need to be shared across different front-ends, the checks could be function calls in c-common, not be put into the gimplifier. One immediate advantage would be that -fsyntax-only wouldn't need to run the gimplifier. -Chris Subject: Re: -fsyntax-only runs the gimplifier "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes: | right now if we don't gimplify with -fsyntax-only, we would not be able to | diagnostic the following: | void f(void) | { | break; | } That is one more reason why it is a bug in the compiler. -- Gaby Subject: Re: New: -fsyntax-only runs the gimplifier "sabre at nondot dot org" <gcc-bugzilla@gcc.gnu.org> writes: | Compiling a C++ file with -fsyntax-only -ftime-report includes time spent on | 'tree gimplify'. Unless I'm missing something, -fsyntax-only | shouldn't have to gimplify anything. I strongly agree that that is a bug in the way the compiler currently works. -- Gaby (In reply to comment #3) > right now if we don't gimplify with -fsyntax-only, we would not be able to > diagnostic the following: > void f(void) > { > break; > } If that is true, then it should be considered a bug in the C++ front-end. I am going to seperate this into a couple of different bugs. I found some other ones which had been added after this bug report was open :(. (In reply to Andrew Pinski from comment #9) > I found some other ones which had been added after this bug report was open > :(. Well at least there's only 1 of them left open |