This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pph] Add error for pre-parsing unguarded headers.


On 11-02-24 04:30 PM, Lawrence Crowl wrote:

--- 4094,4106 ----
  pph_finish (void)
  {
    if (pph_out_file != NULL)
!     {
!       const char* offending_file = cpp_main_missing_guard (parse_in);

s/char* /char */



+   /* Skip directories.  */
+   if (entry->start_dir != NULL)
+     {
+       _cpp_file *file = entry->u.file;
+
+       /* FIXME pph: It's not clear what effect once_only should have.  */
+       if (!file->once_only && file->cmacro == NULL
+           && file->stack_count == 1 && file->main_file)

Line the predicates vertically.


Shouldn't #pragma once make the file pph-friendly?



+
+ /* Return the path name of the main file iff it does not have a
+    multiple include guard. */

Doesn't this return the name of *a* file that is not double-guarded?



Diego.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]