> On Oct. 11, 2016, 4:43 p.m., Tony Gutierrez wrote: > > src/sim/syscall_desc.hh, line 66 > > <http://reviews.gem5.org/r/3662/diff/2/?file=59639#file59639line66> > > > > (void) is not necessary in c++. also this is not gem5 convention. > > Brandon Potter wrote: > I tried to get the same change past Steve once and he shot me down with > the same response. __Sigh__, I prefer my void being there (and it's > completely legal), but I'll change it for make benefit of glorious gem5. > > Another common but unnecessary habit which I see quite a bit is using > "unsigned int" instead of just "unsigned". We'll have to crack down on those > folks now while we're at it. :)
It's legal, but I believe it's only there to provide backwards compatibility with C. And the only reason this construct even exists in C is to distinguish prototypes of functions with no parameters with old-school K&R function declarations that don't provide parameter information (and which are not part of C++, and really should not be in any C code written in the last 25 years). So I think you should treat this feature as a historical anomaly and not as something you should be trying to exploit ;). - Steve ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3662/#review8819 ----------------------------------------------------------- On Oct. 17, 2016, 8:08 a.m., Brandon Potter wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3662/ > ----------------------------------------------------------- > > (Updated Oct. 17, 2016, 8:08 a.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11690:4bd82b7d3c09 > --------------------------- > syscall_emul: [patch 2/22] move SyscallDesc into its own .hh and .cc > > The class was crammed into syscall_emul.hh which has tons of forward > declarations and template definitions. To clean it up a bit, moved the > class into separate files and commented the class with doxygen style > comments. Also, provided some encapsulation by adding some accessors and > a mutator. > > The syscallreturn.hh file was renamed syscall_return.hh to make it consistent > with other similarly named files in the src/sim directory. > > The DPRINTF_SYSCALL macro was moved into its own header file with the > include the Base and Verbose flags as well. > > > Diffs > ----- > > src/arch/alpha/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/arm/freebsd/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/arm/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/mips/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/power/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/sparc/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/sparc/linux/syscalls.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/sparc/solaris/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/x86/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/x86/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/kern/tru64/tru64.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/SConscript 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/process.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/syscall_debug_macros.hh PRE-CREATION > src/sim/syscall_desc.hh PRE-CREATION > src/sim/syscall_desc.cc PRE-CREATION > src/sim/syscall_emul.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/syscall_emul.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/syscallreturn.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 > > Diff: http://reviews.gem5.org/r/3662/diff/ > > > Testing > ------- > > > Thanks, > > Brandon Potter > > _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev