On Wed, Jun 27, 2012 at 2:12 PM, Maarten Brock <sourceforge.brock@...:
> > On Wed, Jun 27, 2012 at 12:07 PM, Maarten Brock <
> sourceforge.brock@...:
> >
> > > > On Wed, Jun 27, 2012 at 9:59 AM, Maarten Brock <
> sourceforge.brock@...
> > > >wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > > > The problem is hopefully fixed in svn revision #7984.
> > > > > > >
> > > > > > > Patryk, can you please verify it?
> > > > > >
> > > > > > This is a rather big change, which looks like it affects all
> ports.
> > > > > >
> > > > > > svn diff -r 7983:7984 | wc -l
> > > > > >
> > > > > > gives 343 for me.
> > > > > >
> > > > > > I suggest a RC3 as soon as Patryk confirms the issue as fixed.
> > > > > >
> > > > > > Philipp
> > > > >
> > > > > I have done a small test and found that instead of
> > > > > double backslashes I now get single forward slashes. I'm
> > > > > not sure if a regular windows editor or IDE can pick up
> > > > > on those to open the right file with the error when SDCC
> > > > > is called from within.
> > > >
> > > >
> > > > Maarten, I found a bug in my "fix" :-(. I already commited the 2nd
> fix
> > > and
> > > > restarted x86 build on derna.
> > > >
> > > > Unfortunately it seems that this fix has nothing to do with the
> backslash
> > > > to slash conversion you reported.
> > > >
> > > > I couldn't reproduce the behaviour you reported. Can you please
> give me
> > > > more info about the plaform (probably Win98?), the shell (cygwin
> bash or
> > > > cmd.exe), command line and program you are compiling?
> > > >
> > > > Borut
> > >
> > > Hi,
> > >
> > > I used todays SDCC #7984 and just did sdcc -c Source\file.c which
> includes
> > > defines.h from the same Source directory. There is a warning from
> defines.h
> > > reported with Source/defines.h.
> > >
> >
> > I tried it on WinXP with the following file.c content:
> >
> > ----8<----
> > #include "Source/defines.h"
> >
> > void
> > main (void)
> > {
> > c
> > }
> > ---->8----
> >
> > the result with revision #7984:
> >
> > C:\>sdcc -c Source\file.c
> > Source\file.c:1:28: error: Source/defines.h: No such file or directory
> > # reported by sdcpp, OK
> > Sourcefile.c:6: syntax error: token -> 'char' ; column 6
> > # reported bs sdcc, missing '/' between Source and
> file.c
> >
> > the result with revision #7986:
> >
> > C:\>\svn_snapshots\sdcc.build_cygwin\bin\sdcc.exe -c Source\file.c
> > Source\file.c:1:28: error: Source/defines.h: No such file or directory
> > # reported by sdcpp, OK
> > Source\file.c:7: syntax error: token -> '}' ; column 1
> > # reported bs sdcc, OK
> >
> > Is this the same as what you get?
> >
> > I guess the ''bug' was that there was no slash at all anymore when the
> error
> > > is in the source itself as I just found out.
> >
> >
> > Right, I skipped one char too much :-(.
> >
> > Borut
> >
>
> Sorry, I was not clear enough. The file is:
>
> 8<---- *file.c*
> #include "defines.h"
>
> void main (void)
> {
> }
> 8<---- *defines.h*
> struct TChapter
> {
> char Name[14];
> char* Sets[]; //generates warning 187
> };
> 8<----
>
> And the output of sdcc -c Source\file.c on WinXP gives:
>
> Source/defines.h:4: warning 187: ISO C90 does not
>
With my latest fix is even worse:
C:\>\svn_snapshots\sdcc.build_cygwin\bin\sdcc.exe -c Source\file.c
Source\/defines.h:5: warning 187: ISO C90 does not support flexible array
members support flexible array members
But the problem is in sdcpp (and cpp) not in sdcc:
C:\>\svn_snapshots\sdcc.build_cygwin\bin\sdcc.exe -E Source\file.c
# 1 "Source\\file.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "Source\\file.c"
# 1 "Source\\/defines.h" 1 <-- Note the extra slash!!!!!
...
Cygwin gcc has the same problem:
C:\>gcc-3 -std=c89 -c Source\file.c
In file included from Source\file.c:1:
Source\/defines.h:4: error: parse error before '/' token
Source\/defines.h:4: warning: no semicolon at end of struct or union
Source\file.c: In function `main':
Source\file.c:6: error: parse error before '/' token
Source\file.c:5: warning: return type of 'main' is not `int'
C:\>gcc-3 -std=c89 -E Source\file.c
# 1 "Source\\file.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "Source\\file.c"
# 1 "Source\\/defines.h" 1 <-- Note the extra slash!!!!!
...
Since the problem is not in sdcc I suggest to leave it as it is for SDCC
3.2.0 release, fix it in sdcpp after the release and suggest the fix to
cygwin gcc and/or gcc teams.
Borut
|