]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
remove useless typedefs
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
7ad1d78d 12015-08-12 Marek Polacek <polacek@redhat.com>
2
3 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4 LOC to it.
5
c9099388 62015-08-03 Marek Polacek <polacek@redhat.com>
7
8 PR c/67088
9 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
10 Use it.
11 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
12
9255be07 132015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
14
15 * c-parser.c (c_parser_if_body): Take token_indent_info
16 argument. Call warn_for_misleading_indentation even when the
17 body is a semicolon. Extract token_indent_infos corresponding
18 to the guard, body and next tokens. Adjust call to
19 warn_for_misleading_indentation accordingly.
20 (c_parser_else_body): Likewise.
21 (c_parser_if_statement): Likewise.
22 (c_parser_while_statement): Likewise.
23 (c_parser_for_statement): Likewise.
24
dbbd4c6d 252015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
26 Manuel López-Ibáñez <manu@gcc.gnu.org>
27
28 * c-decl.c (get_parm_info): Remove static var. Update warning
29 message.
30
6784a472 312015-07-27 Marek Polacek <polacek@redhat.com>
32
33 PR c++/66555
34 PR c/54979
35 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
36
8d669e79 372015-07-20 Marek Polacek <polacek@redhat.com>
38
39 PR c++/55095
40 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
41 (build_binary_op): Warn about left shift overflows.
42
1eacc14a 432015-07-09 Andrew MacLeod <amacleod@redhat.com>
44
45 * c-array-notation.c: Adjust includes for flags.h changes.
46 * c-objc-common.c: Likewise.
47
9ef16211 482015-07-07 Andrew MacLeod <amacleod@redhat.com>
49
50 * c-array-notation.c: Adjust includes.
51 * c-aux-info.c: Likewise.
52 * c-convert.c: Likewise.
53 * c-decl.c: Likewise.
54 * c-errors.c: Likewise.
55 * c-lang.c: Likewise.
56 * c-objc-common.c: Likewise.
57 * c-parser.c: Likewise.
58 * c-typeck.c: Likewise.
59
0949f227 602015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
61
62 PR fortran/66605
63 * c-decl.c (finish_function): Call do_warn_unused_parameter.
64
be23b16f 652015-06-29 Marek Polacek <polacek@redhat.com>
66
67 PR c/66322
68 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
69 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
70 about -Wswitch-bool here.
71 (do_case): Update c_add_case_label call.
72 (c_finish_case): Update c_do_switch_warnings call.
73
6290f0db 742015-06-27 Marek Polacek <polacek@redhat.com>
75
76 * c-typeck.c: Use VECTOR_TYPE_P throughout.
77
aa3e402e 782015-06-26 Marek Polacek <polacek@redhat.com>
79
80 * c-array-notation.c (fix_builtin_array_notation_fn): Use
81 INDIRECT_REF_P.
82 * c-typeck.c (array_to_pointer_conversion): Likewise.
83 (build_unary_op): Likewise.
84 (c_finish_return): Likewise.
85
ec2e0095 862015-06-25 Andrew MacLeod <amacleod@redhat.com>
87
88 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
89 * c-parser.c: Likewise.
90
770ff93b 912015-06-25 Richard Sandiford <richard.sandiford@arm.com>
92
93 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
94 instead of pointer_hash.
95 (detect_field_duplicates): Likewise.
96
f48c7f4a 972015-06-25 Marek Polacek <polacek@redhat.com>
98
99 * c-array-notation.c: Use VAR_P throughout.
100 * c-decl.c: Likewise.
101 * c-objc-common.c: Likewise.
102 * c-parser.c: Likewise.
103 * c-typeck.c: Likewise.
104
ce41e81a 1052015-06-25 Marek Polacek <polacek@redhat.com>
106
107 * c-decl.c: Use is_global_var throughout.
108 * c-parser.c: Likewise.
109 * c-typeck.c: Likewise.
110
f2ab3bac 1112015-06-17 Andrew MacLeod <amacleod@redhat.com>
112
113 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
114 * c-aux-info.c: Likewise.
115 * c-convert.c: Likewise.
116 * c-decl.c: Likewise.
117 * c-errors.c: Likewise.
118 * c-lang.c: Likewise.
119 * c-objc-common.c: Likewise.
120 * c-parser.c: Likewise.
121 * c-typeck.c: Likewise.
122
647730ab 1232015-06-11 Jan Hubicka <hubicka@ucw.cz>
124
125 PR middle-end/66325
126 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
127 variants.
128
dd4b0a0d 1292015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
130
131 * c-decl.c (pop_scope): Register the main translation unit
132 through the new debug hook.
133
64486212 1342015-06-08 Andrew MacLeod <amacleod@redhat.com>
135
136 * c-array-notation.c : Adjust include files.
137 * c-aux-info.c : Likewise.
138 * c-convert.c : Likewise.
139 * c-decl.c : Likewise.
140 * c-errors.c : Likewise.
141 * c-lang.c : Likewise.
142 * c-lang.h : Likewise.
143 * c-objc-common.c : Likewise.
144 * c-parser.c : Likewise.
145 * c-typeck.c : Likewise.
146
3a1c9df2 1472015-06-05 Aldy Hernandez <aldyh@redhat.com>
148
149 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
150 immediately clobber it.
151 (c_write_global_declarations_1): Remove call to
152 check_global_declaration_1.
153 (c_write_global_declarations_2): Remove.
154 (c_write_final_cleanups): Rename from c_write_global_declarations.
155 Remove call to finalize_compilation_unit.
156 Remove calls to debugging hooks.
157 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
158 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
159 * c-tree.h: Remove c_write_global_declarations.
160
f77c0292 1612015-06-04 Andrew MacLeod <amacleod@redhat.com>
162
163 * c-array-notation.c: Adjust includes for restructured coretypes.h.
164 * c-aux-info.c: Likewise.
165 * c-convert.c: Likewise.
166 * c-decl.c: Likewise.
167 * c-errors.c: Likewise.
168 * c-lang.c: Likewise.
169 * c-objc-common.c: Likewise.
170 * c-parser.c: Likewise.
171 * c-typeck.c: Likewise.
172
b44134dc 1732015-06-04 Marek Polacek <polacek@redhat.com>
174
175 PR c/66341
176 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
177 it is a lvalue.
178
d1df0bfc 1792015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
180
181 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
182 Warn for empty struct.
183 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
184
f8363c5d 1852015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
186
187 * c-decl.c (start_function): Call plugin before parsing.
188 (finish_function): Call plugin after parsing.
189
5b9761f5 1902015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
191
192 PR c/49551
193 * c-decl.c (merge_decls): Merge DECL_COMMON.
194
eeec71b4 1952015-05-22 Jim Wilson <jim.wilson@linaro.org>
196
197 * Make-lang.in (check_gcc_pallelize): Define.
198
5a4c69dd 1992015-05-22 Marek Polacek <polacek@redhat.com>
200
201 PR c/47043
202 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
203 attributes.
204
5650b4ff 2052015-05-21 Marek Polacek <polacek@redhat.com>
206
207 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
208 DECL_BUILT_IN.
209
b443c459 2102015-05-20 Marek Polacek <polacek@redhat.com>
211
212 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
213 * c-typeck.c: Likewise.
214
9e73638f 2152015-05-19 Marek Polacek <polacek@redhat.com>
216
217 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
218
d7729e26 2192015-05-19 Jakub Jelinek <jakub@redhat.com>
220
221 PR middle-end/66199
222 * c-parser.c (c_parser_omp_for_loop): Don't add
223 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
224 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
225 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
226 constructs.
227
dfcf26a5 2282015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
229
230 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 231 swaps.
dfcf26a5 232
09172322 2332015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
234
235 PR fortran/44054
236 * c-objc-common.c (c_tree_printer): Replace locus pointer with
237 accessor function.
238
aac24642 2392015-05-14 Marek Polacek <polacek@redhat.com>
240
241 PR c/66066
242 PR c/66127
243 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
244 rather than with 0.
245
e5f01cba 2462015-05-12 David Malcolm <dmalcolm@redhat.com>
247
248 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
249 to add a call to warn_for_misleading_indentation.
250 (c_parser_else_body): Likewise, adding param "else_loc".
251 (c_parser_if_statement): Check for misleading indentation.
252 (c_parser_while_statement): Likewise.
253 (c_parser_for_statement): Likewise.
254
dc5945dc 2552015-05-08 Marek Polacek <polacek@redhat.com>
256
257 PR c/64918
258 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
259 (output_init_element): Likewise.
260
cdc64059 2612015-05-07 Marek Polacek <polacek@redhat.com>
262
263 PR c/65179
264 * c-typeck.c (build_binary_op): Warn when left shifting a negative
265 value.
266
6fa7118e 2672015-04-30 Marek Polacek <polacek@redhat.com>
268
269 * c-typeck.c (set_init_label): Call error_at instead of error and
270 pass LOC to it.
271
98f44804 272 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
273 the type of a decl.
274
2cd7caae 275 * c-typeck.c (c_build_va_arg): Clarify the error message.
276
95cfd391 2772015-04-29 Thomas Schwinge <thomas@codesourcery.com>
278
279 * c-parser.c (c_parser_oacc_enter_exit_data): Use
280 OMP_STANDALONE_CLAUSES.
281
e65e39f8 2822015-04-28 Marek Polacek <polacek@redhat.com>
283
284 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
285
5580bf42 2862015-04-28 Marek Polacek <polacek@redhat.com>
287
288 PR c/65901
289 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
290
c3468fc2 2912015-04-25 Marek Polacek <polacek@redhat.com>
292
293 PR c/52085
294 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
295 attribute.
296
0cd6b1b4 2972015-04-23 Marek Polacek <polacek@redhat.com>
298
299 PR c/65345
300 * c-decl.c (set_labels_context_r): New function.
301 (store_parm_decls): Call it via walk_tree_without_duplicates.
302 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
303 instead of create_tmp_var. Build TARGET_EXPR instead of
304 COMPOUND_EXPR.
305 (build_atomic_assign): Use create_tmp_var_raw instead of
306 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
307
05a827ce 3082015-04-20 Ilya Verbin <ilya.verbin@intel.com>
309
310 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
311 (c_parser_omp_target_update): Add missed %> to error_at ().
312
de801c28 3132015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
314
315 PR target/55143
316 * c-decl.c (c_default_pointer_mode): Remove definition.
317 * c-tree.h (c_default_pointer_mode): Remove declaration.
318
c3b1dca4 3192015-03-27 Tobias Burnus <burnus@net-b.de>
320
321 PR c/65586
322 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
323 error out.
324 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
325 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
326 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
327
1443772f 3282015-03-19 Jakub Jelinek <jakub@redhat.com>
329
330 * c-decl.c (c_decl_attributes): Also add "omp declare target"
331 attribute for DECL_EXTERNAL VAR_DECLs.
332
76738f56 3332015-03-11 Jakub Jelinek <jakub@redhat.com>
334
335 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
336 argument.
337
16f958b3 3382015-03-10 Jakub Jelinek <jakub@redhat.com>
339
340 PR c/65120
341 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
342 before preparing arguments to warn_logical_not_parentheses.
343
6054103a 3442015-03-09 Jakub Jelinek <jakub@redhat.com>
345
346 PR c/65120
347 * c-typeck.c (parser_build_binary_op): Don't warn for
348 !!x == y or !b == y where b is _Bool.
349
de3a1e03 3502015-03-09 Marek Polacek <polacek@redhat.com>
351
352 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
353 * c-decl.c (grokdeclarator): Likewise.
354 * c-typeck.c (build_binary_op): Likewise.
355
084e6bf0 3562015-02-27 Marek Polacek <polacek@redhat.com>
357
358 PR c/65228
359 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
360
4d7c4134 3612015-02-14 Marek Polacek <polacek@redhat.com>
362
363 PR c/64768
364 * c-decl.c (grokdeclarator): Set the range of a flexible array member
365 declared through a typedef name.
366
b1380826 3672015-02-13 Marek Polacek <polacek@redhat.com>
368
369 PR c/65050
370 * c-decl.c (grokdeclarator): Print also the type when giving
371 the error message about array's incomplete element type.
372
35ff54b5 3732015-02-11 Jakub Jelinek <jakub@redhat.com>
374
375 PR c/64824
376 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
377 check in the POP macro.
378
46861609 3792015-02-09 Marek Polacek <polacek@redhat.com>
380
381 PR c/64856
382 * c-typeck.c (process_init_element): Don't always wrap
383 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
384 initializing a range of elements.
385
bbf8fbec 3862015-02-04 Jakub Jelinek <jakub@redhat.com>
387
388 PR c/64824
389 PR c/64868
390 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
391
46861609 3922015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 393
394 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
395 processing enum declaration.
396
70279be9 3972015-01-29 Marek Polacek <polacek@redhat.com>
398
399 PR c/64709
400 * c-typeck.c (pop_init_level): If constructor_elements has
401 exactly one element with integer_zerop value, set constructor_zeroinit
402 to 1. Remove braces around warning_init call.
403
591970b4 4042015-01-27 Jakub Jelinek <jakub@redhat.com>
405
406 PR c/64766
407 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
408 of FUNCTION_DECLs with error_mark_node.
409
87778dc4 4102015-01-26 Jakub Jelinek <jakub@redhat.com>
411
412 PR c/64778
413 * c-typeck.c (convert_arguments): Return -1 if there are
414 error_args, even if we've diagnosed too many arguments.
415
cffdfb3d 4162015-01-21 Richard Biener <rguenther@suse.de>
417
418 PR middle-end/64313
419 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
420 for builtins the user declared correctly.
421
ca4c3545 4222015-01-15 Thomas Schwinge <thomas@codesourcery.com>
423 Bernd Schmidt <bernds@codesourcery.com>
424 Cesar Philippidis <cesar@codesourcery.com>
425 James Norris <jnorris@codesourcery.com>
426 Jakub Jelinek <jakub@redhat.com>
427 Ilmir Usmanov <i.usmanov@samsung.com>
428
429 * c-parser.c: Include "gomp-constants.h".
430 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
431 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
432 Use OMP_CLAUSE_SET_MAP_KIND.
433 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
434 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
435 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
436 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
437 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
438 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
439 "copyout", "create", "delete", "deviceptr", "gang", "host",
440 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
441 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
442 "present_or_create", "pcreate", "seq", "self", "vector",
443 "vector_length", "wait", "worker".
444 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
445 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
446 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
447 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
448 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
449 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
450 (c_parser_oacc_data_clause_deviceptr)
451 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
452 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
453 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
454 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
455 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
456 (c_parser_oacc_parallel, c_parser_oacc_update)
457 (c_parser_oacc_wait): New functions.
458 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
459 (c_finish_oacc_data): New prototypes.
460 * c-typeck.c: Include "gomp-constants.h".
461 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
462 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
463 OMP_CLAUSE_SET_MAP_KIND.
464 (c_finish_oacc_parallel, c_finish_oacc_kernels)
465 (c_finish_oacc_data): New functions.
466 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
467 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
468 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
469 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
470 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
471 GOMP_MAP_FORCE_DEVICEPTR.
472
1f78217c 4732015-01-09 Michael Collison <michael.collison@linaro.org>
474
475 * c-array-notation.c: Include hash-set.h, machmode.h,
476 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
477 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
478 * c-aux-info.c: Ditto.
479 * c-convert.c: Ditto.
480 * c-decl.c: Ditto.
481 * c-errors.c: Ditto.
482 * c-lang.c: Dittoxs.
483 * c-objc-common.c: Ditto.
484 * c-parser.c: Ditto.
485 * c-typeck.c: Include hash-set.h, machmode.h,
486 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
487 fold-const.h, wide-int.h, inchash.h, real.h and
488 fixed-value.h due to flattening of tree.h.
489
15e18a8c 4902015-01-07 Marek Polacek <polacek@redhat.com>
491
492 PR c/64417
493 * c-typeck.c (process_init_element): Disallow initialization of
494 a flexible array member with a string constant if the structure
495 is in an array.
496
d353bf18 4972015-01-05 Jakub Jelinek <jakub@redhat.com>
498
823a9dd4 499 PR sanitizer/64344
500 * c-typeck.c (convert_for_assignment, c_finish_return): For
501 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
502 types also set in_late_binary_op around convert call.
503 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
504 to integral type casts, if not in_late_binary_op, pass c_fully_fold
505 result on expr as last argument to ubsan_instrument_float_cast,
506 if in_late_binary_op, don't use c_save_expr but save_expr.
507
d353bf18 508 Update copyright years.
509
92b63884 5102015-01-05 Marek Polacek <polacek@redhat.com>
511
512 PR c/64423
513 * c-typeck.c (build_array_ref): Pass loc down to
514 warn_array_subscript_with_type_char.
515
8a8211df 5162014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
517
518 * c-typeck.c: New behavious for pointers to arrays with qualifiers
519 (common-pointer-type): For pointers to arrays take qualifiers from
520 element type.
521 (build_conditional_expr): Add warnings for lost qualifiers.
522 (comp-target-types): Allow pointers to arrays with different qualifiers.
523 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
524 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
525 to PEDWARN_FOR_QUALIFIERS.
526
35ea0139 5272014-12-17 Jakub Jelinek <jakub@redhat.com>
528
529 PR sanitizer/64289
530 * c-convert.c: Include ubsan.h.
531 (convert): For real -> integral casts and
532 -fsanitize=float-cast-overflow don't call convert_to_integer, but
533 instead instrument the float cast directly.
534
f9e245b2 5352014-11-29 Jakub Jelinek <jakub@redhat.com>
536
537 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
538 c_finish_stmt_expr): Remove NULL last argument from
539 create_tmp_var_raw and create_tmp_var calls.
540 * c-array-notation.c (fix_builtin_array_notation_fn,
541 build_array_notation_expr, fix_conditional_array_notations_1,
542 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
543
fce2dbd1 5442014-11-28 Marek Polacek <polacek@redhat.com>
545
546 PR c/63862
547 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
548 convert the right operand to integer type.
549
396c36b7 5502014-11-25 Marek Polacek <polacek@redhat.com>
551
552 PR c/63877
553 * c-decl.c (start_function): Disable -Wmissing-declarations warning
554 for inline functions.
555
c61ef207 5562014-11-21 Jakub Jelinek <jakub@redhat.com>
557
558 PR target/63764
559 * c-typeck.c (build_array_ref): Adjust
560 convert_vector_to_pointer_for_subscript caller. If it returns true,
561 call non_lvalue_loc on the result.
562
565353e8 5632014-11-11 Richard Biener <rguenther@suse.de>
564
565 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
566 to true.
567
fdd735a7 5682014-11-10 Andi Kleen <ak@linux.intel.com>
569
570 PR c/60804
571 * c-parser.c (c_parser_statement_after_labels): Call
572 check_no_cilk.
573 (c_parser_if_statement): Dito.
574 (c_parser_switch_statement): Dito.
575 (c_parser_while_statement): Dito.
576 (c_parser_do_statement): Dito.
577 (c_parser_for_statement): Dito.
578 * c-typeck.c (c_finish_loop): Dito.
579
0feb4de1 5802014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
581
582 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
583 OPT_Wshift_count_overflow in the warnings.
584
a3fec48a 5852014-10-30 Marek Polacek <polacek@redhat.com>
586
587 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
588 print the stripped version as well, if they're not the same.
589
3754d046 5902014-10-29 Richard Sandiford <richard.sandiford@arm.com>
591
592 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
593 machine_mode.
594
1140c305 5952014-10-28 Andrew MacLeod <amacleod@redhat.com>
596
597 * c-decl.c: Adjust include files.
598 * c-parser.c: Ditto.
599
ab103e33 6002014-10-27 Phil Muldoon <pmuldoon@redhat.com>
601 Tom Tromey <tromey@redhat.com>
602
603 * c-tree.h (enum c_oracle_request): New.
604 (c_binding_oracle_function): New typedef.
605 (c_binding_oracle, c_pushtag, c_bind): Declare.
606 * c-decl.c (c_binding_oracle): New global.
607 (I_SYMBOL_CHECKED): New macro.
608 (i_symbol_binding): New function.
609 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
610 (I_TAG_CHECKED): New macro.
611 (i_tag_binding): New function.
612 (I_TAG_BINDING, I_TAG_DECL): Redefine.
613 (I_LABEL_CHECKED): New macro.
614 (i_label_binding): New function.
615 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
616 (c_print_identifier): Save and restore c_binding_oracle.
617 (c_pushtag, c_bind): New functions.
618
94ea8568 6192014-10-27 Andrew MacLeod <amacleod@redhat.com>
620
621 * c-typeck.c: Adjust include files.
622
32ecf960 6232014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
624
625 PR c++/53061
626 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
627 initialization here...
628 (c_initialize_diagnostics): ... but here. Set defaults after
629 building pretty-printer.
630
2981340f 6312014-10-23 Marek Polacek <polacek@redhat.com>
632
633 PR c/63626
634 * c-decl.c (pop_scope): Don't print warning in external_scope.
635
d303aeaf 6362014-10-19 Marek Polacek <polacek@redhat.com>
637
638 PR c/63567
639 * c-typeck.c (output_init_element): Allow initializing objects with
640 static storage duration with compound literals even in C99 and add
641 pedwarn for it.
642
bccf97da 6432014-10-17 Marek Polacek <polacek@redhat.com>
644
645 PR c/63567
646 * c-typeck.c (digest_init): Allow initializing objects with static
647 storage duration with compound literals even in C99 and add pedwarn
648 for it.
649
d9c77450 6502014-10-17 Marek Polacek <polacek@redhat.com>
651
652 PR c/63543
653 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
654 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
655 error multiple times. Print the type.
656
a2bbd0a7 6572014-10-17 Marek Polacek <polacek@redhat.com>
658
659 PR c/63549
660 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
661 type.
662
e610d2b2 6632014-10-17 Marek Polacek <polacek@redhat.com>
664
665 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
666 (start_function): Use OPT_Wimplicit_int instead of 0.
667 (store_parm_decls_oldstyle): Likewise.
668
6b6e56b6 6692014-10-17 Alan Modra <amodra@gmail.com>
670
671 PR middle-end/61848
672 * c-decl.c (merge_decls): Don't merge section name or tls model
673 to newdecl symtab node, instead merge to olddecl. Override
674 existing olddecl section name. Set tls_model for all thread-local
675 vars, not just OMP thread-private ones. Remove incorrect comment.
676
a3020f2f 6772014-10-16 Andrew MacLeod <amacleod@redhat.com>
678
679 * c-decl.c: Adjust include files.
680
9f75f026 6812014-10-14 DJ Delorie <dj@redhat.com>
682
683 * c-parser.c (c_parse_init): Add RID entries for each __intN.
684 (c_token_starts_typename): Check all __intN, not just __int128.
685 (c_token_starts_declspecs): Likewise.
686 (c_parser_declspecs): Likewise.
687 (c_parser_attribute_any_word): Likewise.
688 (c_parser_objc_selector): Likewise.
689 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
690 (struct c_declspecs): Add int_n_idx field to record *which* __intN
691 is specified.
692 * c-decl.c (declspecs_add_type): Check for all __intN, not just
693 __int128.
694 (finish_declspecs): Likewise.
695
4f284d4a 6962014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
697
698 * c-parser.c (c_parser_all_labels): New function to replace
699 the duplicate code.
700 (c_parser_statement): Call the new function.
701
61a892dc 7022014-10-09 Marek Polacek <polacek@redhat.com>
703
704 PR c/63480
705 * c-typeck.c (pop_init_level): Don't warn about initializing
706 with { }.
707
4e888fd9 7082014-10-07 Marek Polacek <polacek@redhat.com>
709
710 PR c/59717
711 * c-decl.c (header_for_builtin_fn): New function.
712 (implicitly_declare): Suggest which header to include.
713
224bdd51 7142014-10-07 Marek Polacek <polacek@redhat.com>
715
716 * c-convert.c (convert): Use error_operand_p.
717 * c-typeck.c (require_complete_type): Likewise.
718 (really_atomic_lvalue): Likewise.
719 (digest_init): Likewise.
720 (handle_omp_array_sections_1): Likewise.
721
a2bc79db 7222014-10-03 Marek Polacek <polacek@redhat.com>
723
724 PR c/63453
725 * c-decl.c (pop_scope): Don't warn about "inline function declared
726 but never defined" for functions marked with gnu_inline attribute.
727
4fc4088b 7282014-09-25 Jakub Jelinek <jakub@redhat.com>
729
730 PR c++/63249
731 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
732 on low_bound and length.
733
5213d6c9 7342014-09-24 Marek Polacek <polacek@redhat.com>
735
736 PR c/61405
737 PR c/53874
738 * c-parser.c: Don't define CPP_KEYWORD.
739 (c_parser_switch_statement): Pass original type to c_finish_case.
740 * c-tree.h (c_finish_case): Update declaration.
741 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
742 conditionally to c_do_switch_warnings.
743
6ea2b1bc 7442014-09-03 Marek Polacek <polacek@redhat.com>
745
746 PR c/62024
747 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
748 conversions.
749
40750995 7502014-09-02 Jakub Jelinek <jakub@redhat.com>
751 Balaji V. Iyer <balaji.v.iyer@intel.com>
752 Igor Zamyatin <igor.zamyatin@intel.com>
753
754 * c-parser.c (c_parser_cilk_for): New function.
755 (c_parser_cilk_grainsize): Likewise.
756 (c_get_temp_regvar): Likewise.
757 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
758 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
759 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
760 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
761 case.
762
8c583613 7632014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
764
765 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
766 with using HOST_WIDE_INT without truncation to 'int'
767
dc6229e8 7682014-08-22 Marek Polacek <polacek@redhat.com>
769
770 PR c++/62199
771 * c-typeck.c (parser_build_binary_op): Adjust call to
772 warn_logical_not_parentheses.
773
5fdda74b 7742014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
775
776 PR other/62008
777 * c-parser.c (c_parser_array_notation): Check for correct
778 type of an array added.
779
78bf4156 7802014-08-19 Marek Polacek <polacek@redhat.com>
781
782 PR c++/62153
783 * c-typeck.c (build_binary_op): If either operand of a comparison
784 is a boolean expression, call maybe_warn_bool_compare.
785
005b8fe7 7862014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
787
788 PR c/45584
789 * c-typeck.c (build_c_cast): Do a conversion even when the
790 TYPE_MAIN_VARIANTs are the same.
791
508ea33a 7922014-08-19 Marek Polacek <polacek@redhat.com>
793
794 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
795 pedwarn_c99 instead of pedwarn.
796 (grokfield): Likewise.
797 (warn_defaults_to): New function.
798 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
799 Unconditionally call pedwarn_c99 instead of pedwarn.
800 (start_function): Call warn_defaults_to instead of pedwarn_c99.
801 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
802 check flag_isoc11 before.
803 * c-errors.c (pedwarn_c99): Change the return type to bool.
804 Handle -Wc99-c11-compat.
805 * c-parser.c (disable_extension_diagnostics): Handle
806 warn_c99_c11_compat.
807 (restore_extension_diagnostics): Likewise.
808 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
809 instead of pedwarn, don't check flag_isoc11 before.
810 (c_parser_declspecs): Likewise.
811 (c_parser_alignas_specifier): Likewise.
812 (c_parser_alignof_expression): Likewise.
813 (c_parser_generic_selection): Likewise.
814 * c-tree.h (pedwarn_c99): Update declaration.
815 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
816 of pedwarn_c99.
817
806fe15e 8182014-08-19 Marek Polacek <polacek@redhat.com>
819
820 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
821 to pedwarn_c90.
822 * c-errors.c: Include "opts.h".
823 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
824 * c-parser.c (disable_extension_diagnostics): Handle negative value
825 of warn_c90_c99_compat, too.
826 (restore_extension_diagnostics): Likewise.
827 (c_parser_compound_statement_nostart): Pass
828 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
829
89868e45 8302014-08-12 Marek Polacek <polacek@redhat.com>
831
832 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
833 Add pedwarn.
834 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
835 Likewise.
836 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
837
890c2e2f 8382014-08-10 Marek Polacek <polacek@redhat.com>
839
840 PR c/51849
841 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
842 Call pedwarn_c90 instead of pedwarn.
843 (check_bitfield_type_and_width): Likewise.
844 (declspecs_add_qual): Likewise.
845 (declspecs_add_type): Likewise.
846 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
847 Adjust to only call pedwarn_c90.
848 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
849 pedwarn_c90 instead of pedwarn.
850 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
851 * c-parser.c (disable_extension_diagnostics): Handle
852 warn_c90_c99_compat.
853 (restore_extension_diagnostics): Likewise.
854 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
855 pedwarn_c90 instead of pedwarn.
856 (c_parser_initelt): Likewise.
857 (c_parser_postfix_expression): Likewise.
858 (c_parser_postfix_expression_after_paren_type): Likewise.
859 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
860 * c-tree.h: Fix formatting.
861 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
862 pedwarn_c90 instead of pedwarn.
863
7149db5f 8642014-08-07 Trevor Saunders <tsaunders@mozilla.com>
865
866 * c-typeck.c: Remove include of pointer-set.h.
867
1c75251e 8682014-08-07 Marek Polacek <polacek@redhat.com>
869
870 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
871
06ecf488 8722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
873
874 * c-typeck.c: Use hash_map instead of pointer_map.
875
431205b7 8762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
877
878 * c-decl.c: Use hash_set instead of pointer_set.
879
3394c80c 8802014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
881
882 PR middle-end/61455
883 * c-array-notation.c (expand_array_notations): Handling
884 of DECL_EXPR added.
885
f22a2cb7 8862014-07-31 Marc Glisse <marc.glisse@inria.fr>
887
888 PR c++/60517
889 * c-typeck.c (c_finish_return): Return 0 instead of the address of
890 a local variable.
891
74691f46 8922014-07-30 Tom Tromey <tromey@redhat.com>
893
894 * c-typeck.c (struct constructor_stack) <designator_depth>: New
895 field.
896 (really_start_incremental_init, push_init_level): Initialize
897 designator_depth.
898 (pop_init_level): Set global designator_depth.
899 (process_init_element): Check for designated_init attribute.
900
f9767fb6 9012014-07-20 Marek Polacek <polacek@redhat.com>
902
903 PR c/61852
904 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
905 (implicitly_declare): Pass location to implicit_decl_warning.
906
305d96bc 9072014-07-14 Jakub Jelinek <jakub@redhat.com>
908
909 PR middle-end/61294
910 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
911 If non-NULL, call c_parser_check_literal_zero.
912 (c_parser_check_literal_zero): New function.
913 (c_parser_postfix_expression_after_primary): Adjust
914 c_parser_expr_list caller, handle -Wmemset-transposed-args.
915
87d59e72 9162014-07-06 Marek Polacek <polacek@redhat.com>
917
918 PR c/6940
919 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
920 * c-tree.h (C_ARRAY_PARAMETER): Define.
921 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
922 function parameter.
923
752098c8 9242014-07-02 Jan Hubicka <hubicka@ucw.cz>
925 Chen Gang <gang.chen.5i5j@gmail.com>
926
927 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
928 releasing symbol.
929
1207866e 9302014-07-01 Marek Polacek <polacek@redhat.com>
931
932 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
933 instead of 0 to WARN_FOR_ASSIGNMENT.
934
7a6bbb76 9352014-07-01 Marek Polacek <polacek@redhat.com>
936
937 PR c/58286
938 * c-typeck.c (convert_for_assignment): Pass
939 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
940
70575064 9412014-06-30 Marek Polacek <polacek@redhat.com>
942
943 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
944 has no_sanitize_undefined attribute.
945
4879e4cf 9462014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
947
948 PR middle-end/57541
949 * c-array-notation.c (fix_builtin_array_notation_fn):
950 Check for 0 arguments in builtin call. Check that bultin argument is
951 correct.
952 * c-parser.c (c_parser_array_notation): Check for incorrect initial
953 index.
954
45c5b823 9552014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
956
957 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
958 qualifiers in __auto_type for atomic types.
959 (c_parser_typeof_specifier): Discard all type qualifiers in
960 __typeof__ for atomic types.
961
430b73ee 9622014-06-25 Marek Polacek <polacek@redhat.com>
963
964 PR c/61162
965 * c-parser.c (c_parser_statement_after_labels): Pass the location of
966 the return expression to c_finish_return.
967
9580cb79 9682014-06-25 Jakub Jelinek <jakub@redhat.com>
969
970 * c-typeck.c (c_finish_omp_clauses): Make sure
971 OMP_CLAUSE_LINEAR_STEP has correct type.
972
c1f445d2 9732014-06-24 Trevor Saunders <tsaunders@mozilla.com>
974
975 * c-decl.c: Adjust.
976
e471cc6f 9772014-06-24 Jakub Jelinek <jakub@redhat.com>
978
979 * c-parser.c (c_parser_omp_for_loop): For
980 #pragma omp parallel for simd move lastprivate clause from parallel
981 to for rather than simd.
982
499b7390 9832014-06-23 Marek Polacek <polacek@redhat.com>
984
985 * c-typeck.c (parser_build_binary_op): Don't call
986 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
987
5e68df57 9882014-06-15 Jan Hubicka <hubicka@ucw.cz>
989
990 * c-parser.c (c_parser_omp_threadprivate): Likewise.
991 * c-decl.c (merge_decls): Likewise.
992
064b0d02 9932014-06-09 Marek Polacek <polacek@redhat.com>
994
995 PR c/36446
996 * c-typeck.c (error_init): Call inform instead of error_at.
997 (pedwarn_init): Call inform instead of pedwarn.
998 (warning_init): Call inform instead of warning_at.
999
71e19e54 10002014-06-07 Jan Hubicka <hubicka@ucw.cz>
1001
1002 * c-decl.c (merge_decls): Use set_decl_section_name.
1003 (duplicate_decls): Remove node if it exists.
1004
95cdf3fd 10052014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1006
1007 PR c/53119
1008 * c-typeck.c (push_init_level, process_init_element,
1009 pop_init_level): Correct check for zero initialization, move
1010 missing brace warning to respect zero initialization.
1011
a07f86a6 10122014-06-05 Marek Polacek <polacek@redhat.com>
1013
1014 PR c/56724
1015 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1016
32dc1512 10172014-06-05 Marek Polacek <polacek@redhat.com>
1018
1019 PR c/49706
1020 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1021 on the left hand side operand of a comparison.
1022
64cf1262 10232014-06-05 Marek Polacek <polacek@redhat.com>
1024
1025 PR c/48062
1026 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1027 Print note only if the warning was printed.
1028
071f6d39 10292014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1030
1031 PR c/58942
1032 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1033 with a pointer.
1034
c69ec07d 10352014-06-03 Marek Polacek <polacek@redhat.com>
1036
1037 PR c/60439
1038 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1039 c_start_case.
1040 * c-tree.h (c_start_case): Update.
1041 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1042 switch condition has boolean value.
1043
f7715905 10442014-06-02 Andrew MacLeod <amacleod@redhat.com>
1045
1046 * c-decl.c: Include builtins.h.
1047 * c-parser.c: Likewise.
1048
dcfff6f9 10492014-05-27 Marek Polacek <polacek@redhat.com>
1050
1051 PR c/56724
1052 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1053 error and warning calls to error_at and warning_at. Pass location of
1054 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1055 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1056 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1057
c048c42c 10582014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1059
1060 PR c/61191
1061 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1062 function parameters.
1063
8c016392 10642014-05-23 Jan Hubicka <hubicka@ucw.cz>
1065
1066 * c-decl.c (merge_decls): Preserve symtab node pointers.
1067 (duplicate_decls): Free new decl.
1068
184a718f 10692014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1070
6ce915ef 1071 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1072 initialization.
1073
184a718f 1074 * c-parser.c (c_parser_omp_target): Return bool values.
1075
22ac3f78 10762014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1077
1078 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1079 num_teams_loc variable to num_thread_limit_loc.
1080
3ab4693e 10812014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1082
1083 * c-array-notation.c (expand_array_notations): Use void_node
1084 instead of void_zero_node.
1085
25a27413 10862014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1087
1088 * c-decl.c (finish_struct): Adjust.
1089 (finish_enum): Likewise.
1090 (bind): Adjust.
1091 (record_inline_static): Likewise.
1092 (push_scope): Likewise.
1093 (make_label): Likewise.
1094 (lookup_label_for_goto): Likewise.
1095 (finish_struct): Likewise.
1096 (finish_enum): Likewise.
1097 (store_parm_decls): Likewise.
1098 (c_push_function_context): Likewise.
1099 * c-lang.h: Remove usage of variable_size gty attribute.
1100 * c-parser.c (c_parse_init): Adjust.
1101 (c_parse_file): Likewise.
1102
172b8440 11032014-05-13 Marek Polacek <polacek@redhat.com>
1104
1105 PR c/61162
1106 * c-typeck.c (convert_for_assignment): Pass location to
1107 WARN_FOR_ASSIGNMENT instead of input_location.
1108
c9e51d25 11092014-05-10 Marek Polacek <polacek@redhat.com>
1110
1111 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1112 maybe_warn_string_init.
1113 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1114 maybe_warn_string_init.
1115 * c-tree.h (maybe_warn_string_init): Update declaration.
1116 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1117 Call pedwarn_init with loc instead of with input_location.
1118 (digest_init): Pass init_loc to maybe_warn_string_init.
1119 (pop_init_level): Call pedwarn_init with loc instead of with
1120 input_location.
1121 (set_init_index): Likewise.
1122 (process_init_element): Likewise.
1123
53de1631 11242014-05-09 Marek Polacek <polacek@redhat.com>
1125
1126 PR c/61096
1127 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1128 (c_parser_initelt): Pass location to set_init_label. Pass array index
1129 location to set_init_index.
1130 * c-tree.h (push_init_level): Update declaration.
1131 (pop_init_level): Likewise.
1132 (set_init_index): Likewise.
1133 (set_init_label): Likewise.
1134 * c-typeck.c (error_init): Add location parameter. Call error_at
1135 instead of error.
1136 (digest_init): Pass init_loc to error_init.
1137 (really_start_incremental_init):
1138 (push_init_level): Add location parameter. Pass loc to pop_init_level
1139 and error_init.
1140 (pop_init_level): Likewise.
1141 (set_designator): Add location parameter. Pass loc to pop_init_level,
1142 push_init_level, and error_init.
1143 (set_init_index): Add location parameter. Pass loc to error_init and
1144 set_designator.
1145 (set_init_label): Likewise.
1146 (output_init_element): Pass loc to error_init.
1147 (process_init_element): Pass loc to error_init, pop_init_level,
1148 pedwarn_init, and push_init_level.
1149
3e5a8b00 11502014-05-09 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/50459
1153 * c-parser.c (c_parser_attributes): Parse the arguments as an
1154 expression-list if the attribute takes identifier.
1155
c2c4ae8d 11562014-05-08 Marek Polacek <polacek@redhat.com>
1157
1158 PR c/61053
1159 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1160 TYPE_ALIGN_UNIT.
1161
2026249a 11622014-05-08 Marek Polacek <polacek@redhat.com>
1163
1164 PR c/61077
1165 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1166 of main.
1167
960d5a55 11682014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1169 Mike Stump <mikestump@comcast.net>
1170 Richard Sandiford <rdsandiford@googlemail.com>
1171
1172 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1173 (finish_enum): Use wide-int interfaces.
1174 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1175 * c-typeck.c (build_c_cast): Likewise.
1176 (set_nonincremental_init_from_string): Likewise.
1177 (c_tree_equal): Likewise.
1178
e0e14cbd 11792014-05-02 Marek Polacek <polacek@redhat.com>
1180
1181 PR c/25801
1182 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1183 Return size_one_node when the type is not complete.
1184 (pointer_diff): Remove comment.
1185 (build_unary_op): Improve error messages.
1186
27ff10cb 11872014-05-02 Marek Polacek <polacek@redhat.com>
1188
1189 * c-typeck.c (c_finish_return): Separate warning_at calls.
1190
68410ce9 11912014-05-02 Marek Polacek <polacek@redhat.com>
1192
1193 * c-tree.h (error_init): Remove declaration.
1194 (pedwarn_init): Likewise.
1195 * c-typeck.c (error_init): Make static and move above.
1196 (pedwarn_init): Likewise.
1197 (warning_init): Move above.
1198 (maybe_warn_string_init): Likewise.
1199
e8e27117 12002014-05-01 Jeff Law <law@redhat.com>
1201
1202 Revert:
1203
1204 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1205 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1206 avoid goto.
1207
971df357 12082014-05-02 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/60784
1211 * c-typeck.c (push_init_level): Set constructor_designated to
1212 p->designated for structures.
1213
de548fe5 12142014-05-01 Marek Polacek <polacek@redhat.com>
1215
1216 PR c/60915
1217 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1218 function-definition has an attribute after the declarator.
1219
053a0ded 12202014-05-01 Marek Polacek <polacek@redhat.com>
1221
1222 PR c/60257
1223 * c-typeck.c (warning_init): Add location_t parameter. Call
1224 warning_at instead of warning.
1225 (push_init_level): Pass input_location to warning_init.
1226 (add_pending_init): Add location_t parameter. Pass loc to
1227 warning_init.
1228 (set_nonincremental_init): Pass input_location to add_pending_init.
1229 (set_nonincremental_init_from_string): Likewise.
1230 (output_init_element): Pass loc to warning_init and to
1231 add_pending_init.
1232
694296f2 12332014-05-01 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/43395
1236 * c-typeck.c (c_finish_return): Distinguish between label and variable
1237 when warning about returning local address.
1238
86bbd7f9 12392014-05-01 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/29467
1242 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1243 in C89 mode.
1244
e4ab2ef3 12452014-05-01 Marek Polacek <polacek@redhat.com>
1246
1247 PR c/43245
1248 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1249 instead of 0 to WARN_FOR_QUALIFIERS.
1250
ca3999cb 12512014-05-01 Marek Polacek <polacek@redhat.com>
1252
1253 PR c/56989
1254 * c-typeck.c (default_conversion): Use better location for
1255 error call.
1256
52cc0072 12572014-04-30 Marek Polacek <polacek@redhat.com>
1258
1259 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1260 also when SANITIZE_FLOAT_DIVIDE is on.
1261
af379dd3 12622014-04-30 Marek Polacek <polacek@redhat.com>
1263
1264 PR c/60139
1265 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1266 and pedwarn_init. Use loc insted of input_location.
1267
b069c2a0 12682014-04-30 Marek Polacek <polacek@redhat.com>
1269
1270 PR c/60351
1271 * c-typeck.c (build_binary_op): Use location when warning about
1272 shift count.
1273
4a026b48 12742014-04-25 Marek Polacek <polacek@redhat.com>
1275
1276 PR c/18079
1277 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1278 always_inline/noinline and hot/cold attributes.
1279
adc93f31 12802014-04-25 Marek Polacek <polacek@redhat.com>
1281
1282 PR c/60114
1283 * c-parser.c (c_parser_initelt): Pass input_location to
1284 process_init_element.
1285 (c_parser_initval): Pass loc to process_init_element.
1286 * c-tree.h (process_init_element): Adjust declaration.
1287 * c-typeck.c (push_init_level): Pass input_location to
1288 process_init_element.
1289 (pop_init_level): Likewise.
1290 (set_designator): Likewise.
1291 (output_init_element): Add location_t parameter. Pass loc to
1292 digest_init.
1293 (output_pending_init_elements): Pass input_location to
1294 output_init_element.
1295 (process_init_element): Add location_t parameter. Pass loc to
1296 output_init_element.
1297
e1029911 12982014-04-24 Jakub Jelinek <jakub@redhat.com>
1299
1300 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1301 atomic-clause, allow comma in between atomic-clause and
1302 seq_cst.
1303
9f0a7bc6 13042014-04-22 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR c/59073
1307 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1308 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1309
094da06d 13102014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1311
1312 PR middle-end/60469
1313 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1314 create_tmp_var instead build_decl for creating temps.
1315 (build_array_notation_expr): Likewise.
1316 (fix_conditional_array_notations_1): Likewise.
1317 (fix_array_notation_expr): Likewise.
1318 (fix_array_notation_call_expr): Likewise.
1319
5a672e62 13202014-03-28 Jakub Jelinek <jakub@redhat.com>
1321
1322 PR c++/60689
1323 * c-tree.h (c_build_function_call_vec): New prototype.
1324 * c-typeck.c (build_function_call_vec): Don't call
1325 resolve_overloaded_builtin here.
1326 (c_build_function_call_vec): New wrapper function around
1327 build_function_call_vec. Call resolve_overloaded_builtin here.
1328 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1329 Call c_build_function_call_vec instead of build_function_call_vec.
1330 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1331 * c-decl.c (finish_decl): Likewise.
1332
f40f5e0e 13332014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1334
1335 PR c/55383
1336 * c-typeck.c: Use correct format string in cast-qual warning
1337
9ec099a3 13382014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1339
1340 * c-decl.c (c_decl_attributes): Use
1341 lang_hooks.types.omp_mappable_type.
1342 * c-typeck.c (c_finish_omp_clauses): Likewise.
1343
3bfdc94f 13442014-03-06 Marek Polacek <polacek@redhat.com>
1345
1346 PR c/60197
1347 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1348 of checking tree code.
1349
8f1128f8 13502014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1351
1352 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1353 (c_parser_parameter_declaration): Likewise.
1354
977b1853 13552014-02-19 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/60195
1358 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1359 Call mark_exp_read on exp.value.
1360 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1361 TREE_ADDRESSABLE on old instead of val.
1362 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1363
825cd6ef 13642014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1365
1366 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1367 C_EXPR_APPEND by vec_safe_push.
1368 * c-tree.h (C_EXPR_APPEND): Remove.
1369
ec761d5a 13702014-01-31 Marek Polacek <polacek@redhat.com>
1371
1372 PR c/59963
1373 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1374 build_function_call_vec.
1375 (build_function_call): Likewise.
1376 (build_atomic_assign): Likewise.
1377 (build_function_call_vec): Add arg_loc parameter. Use it.
1378 (convert_arguments): Likewise.
1379 (convert_for_assignment): Rename rhs_loc to expr_loc.
1380 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1381 (c_parser_objc_keywordexpr): Likewise.
1382 (c_parser_postfix_expression_after_primary): Call
1383 build_function_call_vec with expr_loc rather than op_loc.
1384 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1385 build_function_call_vec.
1386 (c_parser_expr_list): Add locations parameter. Fill it with locations
1387 of function arguments.
1388 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1389
22a75734 13902014-01-30 Marek Polacek <polacek@redhat.com>
1391
1392 PR c/59940
1393 * c-typeck.c (build_function_call_vec): Use loc parameter.
1394 (convert_arguments): Add location parameter. Use it.
1395 (ep_convert_and_check): Likewise.
1396 (build_atomic_assign): Adjust convert_for_assignment call.
1397 (build_modify_expr): Likewise.
1398 (digest_init): Likewise.
1399 (c_finish_return): Likewise.
1400 (build_conditional_expr): Adjust ep_convert_and_check calls.
1401 (convert_for_assignment): Add rhs_loc parameter. Use it.
1402 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1403 calls.
1404
29f580ac 14052014-01-30 Richard Biener <rguenther@suse.de>
1406
1407 PR c/59905
1408 * c-typeck.c (build_function_call_vec): Do not replace calls
1409 to a function via an incompatible type with a runtime abort.
1410
a89e6c15 14112014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1412
1413 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1414 flag_enable_cilkplus with flag_cilkplus.
1415 (c_parser_direct_declarator_inner): Likewise.
1416 (c_parser_attribute_any_word): Likewise.
1417 (c_parser_attributes): Likewise.
1418 (c_parser_compound_statement): Likewise.
1419 (c_parser_statement_after_labels): Likewise.
1420 (c_parser_if_statement): Likewise.
1421 (c_parser_switch_statement): Likewise.
1422 (c_parser_do_statement): Likewise.
1423 (c_parser_for_statement): Likewise.
1424 (c_parser_unary_expression): Likewise.
1425 (c_parser_postfix_expression): Likewise.
1426 (c_parser_postfix_expression_after_primary): Likewise.
1427 (c_parser_postfix_expression_after_primary): Likewise.
1428 (c_parser_omp_clause_name): Likewise.
1429 (c_finish_omp_declare_simd): Likewise.
1430 (c_parser_cilk_verify_simd): Likewise.
1431 * c-typeck.c (build_array_ref): Likewise.
1432 (build_function_call_vec): Likewise.
1433 (convert_arguments): Likewise.
1434 (build_compound_expr): Likewise.
1435 (c_finish_return): Likewise.
1436 (c_finish_if_stmt): Likewise.
1437 (c_finish_loop): Likewise.
1438 (build_binary_op): Likewise.
1439
2623625f 14402014-01-23 Marek Polacek <polacek@redhat.com>
1441
1442 PR c/59846
1443 * c-typeck.c (parser_build_binary_op): Use location instead of
1444 input_location.
1445 (build_binary_op): Pass location to shorten_compare.
1446
46da3601 14472014-01-23 Marek Polacek <polacek@redhat.com>
1448
1449 PR c/58346
1450 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1451 an empty aggregate.
1452
9a9db3c1 14532014-01-23 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/59871
1456 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1457 of a comma expression.
1458 (emit_side_effect_warnings): Likewise.
1459
69c9b607 14602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1461
1462 PR c/59825
1463 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1464 function to use walk_tree and moved a lot of its functionality to
1465 expand_array_notations.
1466 (expand_array_notations): New function.
1467
7e005ab5 14682014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1469
1470 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1471 attribute an attribute without value.
1472
d6779b5f 14732014-01-23 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR middle-end/58809
1476 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1477 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1478
ec431042 14792014-01-22 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/59891
1482 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1483 of remove_c_maybe_const_expr on op1 and op2.
1484
1248c663 14852014-01-15 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR c/58943
1488 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1489 effects, preevaluate rhs using SAVE_EXPR first.
1490
0bc789fc 14912014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1492
1493 PR c++/59631
1494 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1495 statements with if-elseif statements.
1496
6685d11c 14972014-01-06 Marek Polacek <polacek@redhat.com>
1498
1499 PR c/57773
1500 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1501 defined bit-field types only in ISO C.
1502
3aea1f79 15032014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1504
1505 Update copyright years
1506
e4f22041 15072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1508
1509 * c-array-notation.c: Use the standard form for the copyright notice.
1510
74acc703 15112013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1512
1513 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1514 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1515 field in parser is not empty. If not-empty, call the function
1516 c_parser_finish_omp_declare_simd.
1517 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1518 between SIMD-enabled functions and #pragma simd. Added new parameter.
1519 (c_parser_cilk_all_clauses): Modified the usage of the function
1520 c_parser_cilk_clause_vectorlength as mentioned above.
1521 (c_parser_cilk_simd_fn_vector_attrs): New function.
1522 (c_finish_cilk_simd_fn_tokens): Likewise.
1523 (is_cilkplus_vector_p): Likewise.
1524 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1525 "nomask," and "mask" strings in clause name.
1526 (c_parser_omp_all_clauses): Added 3 new case statements:
1527 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1528 PRAGMA_CILK_CLAUSE_NOMASK.
1529 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1530 check for vector attribute and if so call the function
1531 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1532 called the function c_finish_cilk_simd_fn_tokens.
1533 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1534 parser field is non-empty. If so, parse them as you would parse
1535 the omp declare simd pragma.
1536 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1537 Added a check when step is a parameter and flag it as error.
1538 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1539 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1540 pragma_omp_clause.
1541
395dc01c 15422013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1543
1544 * c-parser.c (c_parser_omp_parallel): Fix description.
1545
433e804e 15462013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1547
1548 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1549 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1550 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1551 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1552
a179a7dc 15532013-12-04 Joseph Myers <joseph@codesourcery.com>
1554
1555 PR c/52023
1556 * c-parser.c (c_parser_alignas_specifier): Use
1557 c_sizeof_or_alignof_type instead of c_alignof.
1558 (c_parser_alignof_expression): Likewise, with min_alignof
1559 parameter depending on alignof spelling used.
1560
bdf1e3c7 15612013-12-04 Marek Polacek <polacek@redhat.com>
1562
1563 PR c/54113
1564 * c-decl.c (start_function): Don't warn for missing prototype for
1565 inline functions.
1566
05e8f674 15672013-12-03 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/59351
1570 * c-decl.c (build_compound_literal): Allow compound literals with
1571 empty initial value.
1572
39f74d66 15732013-12-02 Joseph Myers <joseph@codesourcery.com>
1574
1575 PR c/58235
1576 * c-typeck.c (build_modify_expr): Diagnose assignment to
1577 expression with array type.
1578
f221adca 15792013-11-29 Joseph Myers <joseph@codesourcery.com>
1580
1581 PR c/42262
1582 * c-typeck.c (process_init_element): Do not treat a string as
1583 initializing a whole array when used with a designator for an
1584 individual element.
1585
75bce827 15862013-11-29 Joseph Myers <joseph@codesourcery.com>
1587
1588 PR c/57574
1589 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1590 an inline function following a static declaration.
1591
dc133326 15922013-11-28 Jakub Jelinek <jakub@redhat.com>
1593
1594 PR c/59310
1595 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1596 to p_name before calling c_parser_omp_teams instead of after.
1597 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1598 argument. Remove unused p_name variable.
1599
d09768a4 16002013-11-27 Aldy Hernandez <aldyh@redhat.com>
1601 Jakub Jelinek <jakub@redhat.com>
1602
1603 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1604 external_scope is NULL.
1605
73fd9cbe 16062013-11-27 Tom de Vries <tom@codesourcery.com>
1607 Marc Glisse <marc.glisse@inria.fr>
1608
1609 PR c++/59032
1610 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1611
bc61cadb 16122013-11-22 Andrew MacLeod <amacleod@redhat.com>
1613
1614 * c-typeck.c: Add required include files from gimple.h.
1615
3df42822 16162013-11-22 David Malcolm <dmalcolm@redhat.com>
1617
1618 * c-decl.c (define_label, shadow_tag_warned)
1619 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1620 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1621 (declspecs_add_type): Remove use of in_system_header macro.
1622 * c-parser.c (c_parser_unary_expression): Likewise.
1623 * c-typeck.c (store_init_value, process_init_element)
1624 (c_start_case): Likewise.
1625
1626 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1627 macro.
1628
1629 * c-parser.c (c_parser_set_source_position_from_token): Remove
1630 reference to in_system_header from comment.
1631
08f817b3 16322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1633
1634 * c-decl.c (grokdeclarator): Update comment to refer to
1635 tree_to_[su]hwi rather than tree_low_cst.
1636
6a0712d4 16372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1638
1639 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1640 tree_to_uhwi throughout.
1641
fcb97e84 16422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1643
1644 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1645 throughout.
1646
35ec552a 16472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1648
1649 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1650 throughout.
1651
f2697631 16522013-11-15 Aldy Hernandez <aldyh@redhat.com>
1653
1654 * c-parser.c (c_parser_cilk_simd): New.
1655 (c_parser_cilk_verify_simd): New.
1656 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1657 (c_parser_omp_for_loop): Add case for NE_EXPR.
1658 Set c_break_label for CILK_SIMD.
1659 (c_parser_cilk_clause_vectorlength): New.
1660 (c_parser_cilk_clause_linear): New.
1661 (c_parser_cilk_clause_name): New.
1662 (c_parser_cilk_all_clauses): New.
1663 * c-typeck.c (build_unary_op): Pass location argument to
1664 readonly_error.
1665 (build_modify_expr): Same.
1666 (build_asm_expr): Same.
1667 (c_finish_bc_stmt): Error on break/continue in loops.
1668
e795d6e1 16692013-11-14 Andrew MacLeod <amacleod@redhat.com>
1670
1671 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1672
9ed99284 16732013-11-14 Diego Novillo <dnovillo@google.com>
1674
1675 * c-decl.c: Include print-tree.h.
1676 Include stor-layout.h.
1677 Include varasm.h.
1678 Include attribs.h.
1679 Include stringpool.h.
1680 * c-lang.c: Include fold-const.h.
1681 * c-parser.c: Include stringpool.h.
1682 Include attribs.h.
1683 Include stor-layout.h.
1684 Include varasm.h.
1685 Include trans-mem.h.
1686 * c-typeck.c: Include stor-layout.h.
1687 Include trans-mem.h.
1688 Include varasm.h.
1689 Include stmt.h.
1690
4fba5eb9 16912013-11-13 Joseph Myers <joseph@codesourcery.com>
1692
1693 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1694 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1695 __auto_type.
1696 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1697 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1698 RID_AUTO_TYPE.
1699 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1700 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1701 (c_parser_declarator, c_parser_direct_declarator_inner)
1702 (c_parser_parameter_declaration, c_parser_type_name): All callers
1703 changed.
1704 (c_parser_declaration_or_fndef): Handle declarations with type
1705 determined from the initializer.
1706
a8783bee 17072013-11-12 Andrew MacLeod <amacleod@redhat.com>
1708
e795d6e1 1709 * c-typeck.c: Include gimplify.h.
a8783bee 1710
d184e0c0 17112013-11-12 Joseph Myers <joseph@codesourcery.com>
1712
1713 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1714 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1715 comment.
1716 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1717 or _Thread_local as appropriate in diagnostics.
1718 (build_null_declspecs): Initialize ret->thread_gnu_p.
1719 (declspecs_add_scspec): Handle either __thread or _Thread_local
1720 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1721 pedantic. Do not disallow _Thread_local extern and _Thread_local
1722 static.
1723
b560fabd 17242013-11-07 Joseph Myers <joseph@codesourcery.com>
1725 Andrew MacLeod <amacleod@redhat.com>
1726
1727 * c-aux-info.c (gen_type): Handle atomic qualifier.
1728 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1729 qualifiers when compating types.
1730 (shadow_tag_warned): Handle atomic_p in declspecs.
1731 (quals_from_declspecs): Likewise.
1732 (start_decl): Use c_type_promotes_to when promoting argument
1733 types.
1734 (grokdeclarator): Handle _Atomic.
1735 (get_parm_info): Diagnose any qualifier on "void" as only
1736 parameter.
1737 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1738 comparing types. Use c_type_promotes_to when promoting argument
1739 types.
1740 (finish_function): Use c_type_promotes_to when promoting argument
1741 types.
1742 (build_null_declspecs): Handle atomic_p in declspecs.
1743 (declspecs_add_qual): Handle RID_ATOMIC.
1744 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1745 (c_token_starts_declspecs): Handle RID_ATOMIC.
1746 (c_parser_declspecs): Handle atomic type specifiers and
1747 qualifiers.
1748 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1749 from types of expressions with atomic type.
1750 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1751 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1752 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1753 (c_parser_statement_after_labels, c_parser_switch_statement)
1754 (c_parser_for_statement, c_parser_expr_no_commas)
1755 (c_parser_conditional_expression, c_parser_binary_expression)
1756 (c_parser_cast_expression, c_parser_unary_expression)
1757 (c_parser_postfix_expression)
1758 (c_parser_postfix_expression_after_primary, c_parser_expression):
1759 Use convert_lvalue_to_rvalue.
1760 (c_parser_expression_conv, c_parser_expr_list): Document
1761 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1762 (c_parser_objc_synchronized_statement): Use
1763 convert_lvalue_to_rvalue.
1764 (c_parser_objc_selector): Handle RID_ATOMIC.
1765 (c_parser_objc_receiver, c_parser_array_notation): Use
1766 convert_lvalue_to_rvalue.
1767 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1768 _Atomic (type-name).
1769 (struct c_declspecs): Add atomic_p field.
1770 (convert_lvalue_to_rvalue): Declare.
1771 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1772 corresponding atomic types.
1773 (qualify_type): Don't add _Atomic qualifiers from second argument.
1774 (comp_target_types): Do not allow _Atomic mismatches.
1775 (type_lists_compatible_p): Do not remove atomic qualifiers when
1776 comparing types.
1777 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1778 (build_atomic_assign): New functions.
1779 (build_unary_op): Use build_atomic_assign for atomic increment and
1780 decrement.
1781 (build_conditional_expr): Do not treat _Atomic void as a qualified
1782 version of void.
1783 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1784 (find_anonymous_field_with_type, convert_to_anonymous_field)
1785 (convert_for_assignment): Do not remove atomic qualifiers when
1786 comparing types.
1787 (digest_init): Do not accept initialization of arrays of atomic
1788 elements by string constants.
1789 (build_asm_expr): Use convert_lvalue_to_rvalue.
1790 (build_binary_op): Do not treat _Atomic void as a qualified
1791 version of void.
1792
8b023e7c 17932013-11-06 DJ Delorie <dj@redhat.com>
1794
1795 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1796 both explicit and builtin, print the location of the explicit one.
1797
c630ef93 17982013-11-05 Tobias Burnus <burnus@net-b.de>
1799
1800 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1801 c_parser_omp_distribute, c_parser_omp_teams,
1802 c_parser_omp_target, c_parser_omp_declare): Handle
1803 -fopenmp-simd.
1804
2c4c3477 18052013-11-03 Marek Polacek <polacek@redhat.com>
1806
1807 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1808
df205251 18092013-11-01 Jakub Jelinek <jakub@redhat.com>
1810
1811 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1812 check_dup_generic at the end, unless remove is true.
1813 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1814 remove = true;.
1815 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1816
23871d0c 18172013-10-31 Jakub Jelinek <jakub@redhat.com>
1818
1819 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1820 with decl that is not pointer nor array.
1821
d037099f 18222013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1823
1824 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1825 a spawning function is found.
1826 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1827 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1828 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1829 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1830 case.
1831 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1832 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1833 expr.
1834 (c_finish_return): Added a check to reject _Cilk_spawn in return
1835 expression.
1836 (build_cilk_spawn): New function.
1837 (build_cilk_sync): Likewise.
1838 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1839
4c90c04c 18402013-10-27 Tobias Burnus <burnus@net-b.de>
1841
1842 PR other/33426
1843 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1844 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1845 (c_parser_statement_after_labels): Update calls.
1846
48a972c8 18472013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 1848
1849 PR other/33426
1850 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1851 Handle PRAGMA_IVDEP.
1852 (c_parser_statement_after_labels): Update call.
1853
12f86df0 18542013-10-24 Marek Polacek <polacek@redhat.com>
1855
1856 * c-parser.c (c_parser_struct_declaration): Add a comment.
1857 (c_parser_declarator): Don't allow _Alignas here.
1858
7740abd8 18592013-10-17 Andrew MacLeod <amacleod@redhat.com>
1860
1861 * c-parser.c: Include omp-low.h.
1862 * c-typeck.c: Likewise.
1863
43d03c23 18642013-10-17 Marek Polacek <polacek@redhat.com>
1865
1866 PR c/58267
1867 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1868 Document syntax of the array-declarator.
1869 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1870 are not permitted.
1871 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1872 (c_parser_struct_declaration): Likewise.
1873 (c_parser_declarator): Likewise.
1874 (c_parser_direct_declarator_inner): Likewise.
1875 (c_parser_parameter_declaration): Likewise.
1876 (c_parser_type_name): Likewise.
1877
bc7bff74 18782013-10-11 Jakub Jelinek <jakub@redhat.com>
1879
1880 * c-lang.h (current_omp_declare_target_attribute): New extern
1881 decl.
1882 * c-parser.c: Include c-lang.h.
1883 (struct c_parser): Change tokens to c_token *.
1884 Add tokens_buf field. Change tokens_avail type to unsigned int.
1885 (c_parser_consume_token): If parser->tokens isn't
1886 &parser->tokens_buf[0], increment parser->tokens.
1887 (c_parser_consume_pragma): Likewise.
1888 (enum pragma_context): Add pragma_struct and pragma_param.
1889 (c_parser_external_declaration): Adjust
1890 c_parser_declaration_or_fndef caller.
1891 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1892 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1893 Adjust recursive call.
1894 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1895 of pragma_external.
1896 (c_parser_parameter_declaration): Use pragma_param instead of
1897 pragma_external.
1898 (c_parser_compound_statement_nostart, c_parser_label,
1899 c_parser_for_statement): Adjust
1900 c_parser_declaration_or_fndef callers.
1901 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1902 it through to c_parser_conditional_expression.
1903 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1904 pass it through to c_parser_binary_expression. Adjust recursive
1905 call.
1906 (c_parser_binary_expression): Remove prec argument, add
1907 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1908 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1909 binop matches it, use build2 instead of parser_build_binary_op.
1910 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1911 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1912 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1913 Handle pragma_struct and pragma_param the same as pragma_external.
1914 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1915 (c_parser_omp_variable_list): Parse array sections for
1916 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1917 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1918 (c_parser_omp_clause_reduction): Handle user defined reductions.
1919 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1920 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1921 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1922 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1923 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1924 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1925 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1926 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1927 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1928 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1929 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1930 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1931 (c_parser_omp_for_loop): Add CODE argument, pass it through
1932 to c_finish_omp_for. Change last argument to cclauses,
1933 and adjust uses to grab parallel clauses from the array of all
1934 the split clauses. Adjust c_parser_binary_expression,
1935 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1936 (omp_split_clauses): New function.
1937 (c_parser_omp_simd): New function.
1938 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1939 Allow the function to be called also when parsing combined constructs,
1940 and call c_parser_omp_simd when parsing for simd.
1941 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1942 #pragma omp section, require exactly one structured-block instead of
1943 sequence of statements.
1944 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1945 Allow the function to be called also when parsing combined constructs.
1946 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1947 Allow the function to be called also when parsing combined
1948 constructs.
1949 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1950 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1951 c_parser_omp_teams, c_parser_omp_target_data,
1952 c_parser_omp_target_update, c_parser_omp_target,
1953 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1954 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1955 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1956 (c_parser_omp_construct): Add p_name and mask vars. Handle
1957 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1958 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1959 and c_parser_omp_sections callers.
1960 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1961 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1962 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1963 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1964 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1965 OMP_CLAUSE_DEPEND.
1966 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1967 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1968 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1969 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1970 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1971 * c-typeck.c: Include tree-inline.h.
1972 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1973 handle_omp_array_sections_1, handle_omp_array_sections,
1974 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1975 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1976 user defined reductions.
1977 (c_tree_equal): New function.
1978 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1979 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1980 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1981 c_check_omp_declare_reduction_r): New prototypes.
1982 * c-decl.c (current_omp_declare_target_attribute): New variable.
1983 (c_decl_attributes): New function.
1984 (start_decl, start_function): Use it instead of decl_attributes.
1985 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1986 c_omp_reduction_decl, c_omp_reduction_lookup,
1987 c_check_omp_declare_reduction_r): New functions.
1988
3ce7d1bd 19892013-09-25 Tom Tromey <tromey@redhat.com>
1990
1991 * Make-lang.in (c/gccspec.o): Remove.
1992 (CFLAGS-c/gccspec.o): New variable.
1993 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1994 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1995 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1996
96da1c1d 19972013-09-25 Tom Tromey <tromey@redhat.com>
1998
1999 * Make-lang.in (c/gccspec.o): Don't use subshell.
2000
1b309377 20012013-09-18 Marek Polacek <polacek@redhat.com>
2002
2003 PR sanitize/58443
2004 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2005 Remove unnecessary check.
2006
05f893e1 20072013-09-18 Marek Polacek <polacek@redhat.com>
2008
2009 PR sanitizer/58411
2010 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2011 no_sanitize_undefined attribute.
2012
bda0b9d2 20132013-09-13 Kai Tietz <ktietz@redhat.com>
2014
2015 PR target/57848
2016 * c-decl.c (c_builtin_function_ext_scope): Remove
2017 wrong assumption that it is never called on prexisting
2018 symbol.
2019
73437615 20202013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2021
2022 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2023
eaab24b9 20242013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2025
2026 * c-objc-common.c (c_tree_printer): Tidy.
2027
9e46467d 20282013-08-30 Marek Polacek <polacek@redhat.com>
2029
2030 * c-typeck.c (build_binary_op): Add division by zero and shift
2031 instrumentation.
2032
f8234178 20332013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 2034 Joseph Myers <joseph@codesourcery.com>
f8234178 2035
c90a7d10 2036 PR c/35649
f8234178 2037 * c-typeck.c (c_common_type): Prefer double_type_node over
2038 other REAL_TYPE types with the same precision.
2039 (convert_arguments): Likewise.
2040
6f07f480 20412013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2042
2043 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2044 (c_initialize_diagnostics): Call a destructor for the early printer.
2045
eed6bc21 20462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2047
2048 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2049 printer initialization.
2050
57717943 20512013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 2052
57717943 2053 PR c/57490
2054 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2055 check for truth values.
2056 (expand_array_notation_exprs): Added truth values case. Removed an
2057 unwanted else. Added for-loop to walk through subtrees in default
2058 case.
2059
a94db6b0 20602013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2061
2062 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2063
e76163a9 20642013-07-23 Joseph Myers <joseph@codesourcery.com>
2065
2066 * c-parser.c (struct c_generic_association): Fix typo.
2067
7aa04c8d 20682013-07-23 Tom Tromey <tromey@redhat.com>
2069 Joseph Myers <joseph@codesourcery.com>
2070
2071 * c-parser.c (struct c_generic_association): New.
2072 (c_generic_association_d): New typedef.
2073 (c_parser_generic_selection): New function.
2074 (c_parser_postfix_expression): Handle RID_GENERIC.
2075
76bbe4ca 20762013-07-13 Jason Merrill <jason@redhat.com>
2077
2078 PR c++/57793
2079 * c-decl.c (finish_struct): Check for too-large class.
2080
21ebaa24 20812013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 2082
2083 PR c/57821
2084 * c-typeck.c (set_init_index): When folding, check for index overflow.
2085
936c3081 20862013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2087
2088 * c-parser.c (c_parser_array_notation): Removed rejection of array
2089 notations in an array of function pointers.
2090
50acebe0 20912013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2092
2093 * c-array-notation.c (make_triplet_val_inv): New function.
2094 (create_cmp_incr): Likewise.
2095 (create_array_refs): Likewise.
2096 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2097 Also modularized common parts between functions and called the function.
2098 (build_array_notation_expr): Likewise.
2099 (fix_conditional_array_notations_1): Likewise.
2100 (fix_array_notation_expr): Likewise.
2101 (fix_array_notation_call_expr): Likewise.
2102
01e6cdb4 21032013-06-18 Marek Polacek <polacek@redhat.com>
2104
2105 PR c/57630
2106 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2107
6a3adac6 21082013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2109
2110 * c-array-notation.c (build_array_notation_expr): Reject array notation
2111 mismatch between LHS and RHS even inside a call_expr. Also, removed
2112 a couple while statements that were dead code.
2113
62aab3f3 21142013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2115
2116 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2117 excessive precision expressions in function parameters. Also removed
2118 couple unwanted while statements.
2119
bfc83720 21202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2121
2122 * c-array-notation.c (expand_array_notation_exprs): Added
2123 ARRAY_NOTATION_REF case.
2124
09970d67 21252013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2126
2127 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2128 function to c-family/array-notation-common.c.
2129 (is_cilkplus_reduce_builtin): Likewise.
2130 (find_rank): Likewise.
2131 (extract_array_notation_exprs): Likewise.
2132 (replace_array_notations): Likewise.
2133 (find_inv_trees): Likewise.
2134 (replace_inv_trees): Likewise.
2135 (contains_array_notation_expr): Likewise.
2136 (find_correct_array_notation_type): Likewise.
2137 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2138 (struct inv_list): Moved this to c-family/array-notation-common.c.
2139 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2140
6e13bc01 21412013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2142
2143 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2144 reduction functions outside the for-loop. Added a check if the fundecl
2145 is non-NULL. Finally, removed an unwanted if-statement, and made the
2146 body unconditional.
2147
cc92dddc 21482013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2149
2150 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2151 condition of the if-statement matches the rank of else-block and then-
2152 block when array notations are used.
2153 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2154 expression after the entire function body is parsed.
2155 (c_parser_expr_no_commas): Delayed creating array notation expressions
2156 to the end of function parsing.
2157 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2158 whole if-statement instead of just the condition.
2159 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2160
eddc63fd 21612013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2162
2163 PR c/57474
2164 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2165 array to NULL_TREE if they are unused. Also added a check for the
2166 field to be NULL before its fields are used in future.
2167
a2115a4a 21682013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2169
2170 PR bootstrap/57450
2171 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2172 (build_array_notation_expr): Likewise.
2173
3c6d4197 21742013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2175
2176 * c-typeck.c (build_array_ref): Added a check to see if array's
2177 index is greater than one. If true, then emit an error.
2178 (build_function_call_vec): Exclude error reporting and checking
2179 for builtin array-notation functions.
2180 (convert_arguments): Likewise.
2181 (c_finish_return): Added a check for array notations as a return
2182 expression. If true, then emit an error.
2183 (c_finish_loop): Added a check for array notations in a loop
2184 condition. If true then emit an error.
2185 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2186 (build_binary_op): Added a check for array notation expr inside
2187 op1 and op0. If present, we call another function to find correct
2188 type.
2189 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2190 * c-parser.c (c_parser_compound_statement): Check if array
2191 notation code is used in tree, if so, then transform them into
2192 appropriate C code.
2193 (c_parser_expr_no_commas): Check if array notation is used in LHS
2194 or RHS, if so, then build array notation expression instead of
2195 regular modify.
2196 (c_parser_postfix_expression_after_primary): Added a check for
2197 colon(s) after square braces, if so then handle it like an array
2198 notation. Also, break up array notations in unary op if found.
2199 (c_parser_direct_declarator_inner): Added a check for array
2200 notation.
2201 (c_parser_compound_statement): Added a check for array notation in
2202 a stmt. If one is present, then expand array notation expr.
2203 (c_parser_if_statement): Likewise.
2204 (c_parser_switch_statement): Added a check for array notations in
2205 a switch statement's condition. If true, then output an error.
2206 (c_parser_while_statement): Similarly, but for a while.
2207 (c_parser_do_statement): Similarly, but for a do-while.
2208 (c_parser_for_statement): Similarly, but for a for-loop.
2209 (c_parser_unary_expression): Check if array notation is used in a
2210 pre-increment or pre-decrement expression. If true, then expand
2211 them.
2212 (c_parser_array_notation): New function.
2213 * c-array-notation.c: New file.
2214 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2215
2c1c8a2c 22162013-05-23 Mike Stump <mikestump@comcast.net>
2217
2218 * c-typeck.c (convert_for_assignment): Handle references to memory
2219 spaces better.
2220
be5f9e46 22212013-05-16 Jason Merrill <jason@redhat.com>
2222
2223 * Make-lang.in (cc1$(exeext)): Use link mutex.
2224
9205a6cc 22252013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2226
2227 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2228 to simply use OPT_Wpointer_arith.
2229 (build_unary_op): Likewise.
2230
0b049e15 22312013-04-03 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR c/19449
2234 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2235 argument. If set, or it temporarily for parsing of the first
2236 argument into force_folding_builtin_constant_p.
2237 (c_parser_postfix_expression): Adjust callers.
2238
8e966116 22392013-03-21 Richard Biener <rguenther@suse.de>
2240
2241 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2242 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2243
b862f263 22442013-02-12 Marek Polacek <polacek@redhat.com>
2245
2246 PR c/44938
2247 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2248 origtypes to NULL.
2249
54550ecb 22502013-01-24 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c/56078
2253 * c-typeck.c (set_nonincremental_init_from_string): If
2254 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2255 returned false.
2256 (process_init_element): Likewise.
2257
035b65e2 22582012-12-20 Jakub Jelinek <jakub@redhat.com>
2259
2260 PR c++/55619
2261 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2262 argument, don't call default_function_array_conversion
2263 nor c_fully_fold here.
2264 (c_parser_asm_statement): Adjust callers.
2265 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2266 and outputs here, and call default_function_array_conversion
2267 on inputs that don't need to be addressable.
2268
7cbb7f1a 22692012-12-18 Jakub Jelinek <jakub@redhat.com>
2270
2271 PR c/39464
2272 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2273 warning require that both c_common_unsigned_type as well as
2274 c_common_signed_type is the same for both mvl and mvr types.
2275
f1f41a6c 22762012-11-16 Diego Novillo <dnovillo@google.com>
2277
2278 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2279
2280 * c-common.c: Use new vec API in vec.h.
2281 * c-common.h: Likewise.
2282 * c-gimplify.c: Likewise.
2283 * c-pragma.c: Likewise.
2284 * c-pretty-print.c: Likewise.
2285 * c-pretty-print.h: Likewise.
2286 * c-semantics.c: Likewise.
2287 * c-decl.c: Likewise.
2288 * c-parser.c: Likewise.
2289 * c-tree.h: Likewise.
2290 * c-typeck.c: Likewise.
2291
8b447d3f 22922012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2293
2294 PR c++/54930
2295 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2296
08fc5390 22972012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2298
2299 PR c/53066
2300 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2301 shadows a function, unless the variable is a function or a
2302 pointer-to-function.
2303
57f872a2 23042012-10-12 Jakub Jelinek <jakub@redhat.com>
2305
2306 PR c/54381
2307 * c-parser.c (struct c_tree_loc_pair): Removed.
2308 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2309 add location_t * and tree * arguments, fill in array of 3
2310 sizeof_arg trees and corresponding locs.
2311 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2312 c_parser_expr_list callers.
2313 (c_parser_postfix_expression_after_primary): Likewise. Pass
2314 array of 3 sizeof_arg trees and locs (corresponding to first
2315 3 arguments) to sizeof_pointer_memaccess_warning.
2316
d1455aa3 23172012-10-09 Lawrence Crowl <crowl@google.com>
2318
2319 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2320 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2321 hash table.
2322
b0e7825e 23232012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2324
2325 PR c++/54194
2326 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2327 call.
2328
41ed701a 23292012-10-09 Marc Glisse <marc.glisse@inria.fr>
2330
2331 PR c++/54427
2332 * c-typeck.c: Include c-common.h.
2333 (enum stv_conv): Moved to c-common.h.
2334 (scalar_to_vector): Moved to c-common.c.
2335 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2336 * Make-lang.in: c-typeck.c depends on c-common.h.
2337
ef34afc1 23382012-10-04 Arnaud Charlet <charlet@adacore.com>
2339
2340 * c-decl.c (c_write_global_declarations): Fix handling of
2341 -fdump-ada-spec*.
2342
7bd765d4 23432012-09-30 Sharad Singhai <singhai@google.com>
2344
2345 * c-decl.c (c_write_global_declarations): Use a different method
2346 to determine if the dump has ben initialized.
2347
c4b1a13a 23482012-09-14 Joseph Myers <joseph@codesourcery.com>
2349
2350 PR c/54552
2351 * c-typeck.c (c_cast_expr): When casting to a type requiring
2352 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2353 c_fully_fold first.
2354
bb554051 23552012-09-14 Joseph Myers <joseph@codesourcery.com>
2356
2357 PR c/54103
2358 * c-typeck.c (build_unary_op): Pass original argument of
2359 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2360 any C_MAYBE_CONST_EXPR, if it has integer operands.
2361 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2362 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2363 to c_objc_common_truthvalue_conversion, then remove any
2364 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2365 c_objc_common_truthvalue_conversion not
2366 c_common_truthvalue_conversion.
2367 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2368 call note_integer_operands for arguments with integer operands
2369 that are not integer constants.
2370
c708c6ef 23712012-09-13 Jakub Jelinek <jakub@redhat.com>
2372
2373 PR c/54559
2374 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2375 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2376
cce20430 23772012-08-31 Jakub Jelinek <jakub@redhat.com>
2378
2379 PR c/54428
2380 * c-convert.c (convert): Don't call fold_convert_loc if
2381 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2382 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2383 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2384
a90d57ed 23852012-08-24 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR c/54355
2388 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2389 for nested and empty_ok arguments in the call to
2390 c_parser_declaration_or_fndef.
2391
f003f5dc 23922012-08-17 Jakub Jelinek <jakub@redhat.com>
2393
2394 * c-tree.h (c_last_sizeof_arg): Declare.
2395 * c-parser.c (struct c_tree_loc_pair): New type.
2396 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2397 non-NULL.
2398 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2399 (c_parser_postfix_expression_after_primary): Likewise. Call
2400 sizeof_pointer_memaccess_warning if needed.
2401 (sizeof_ptr_memacc_comptypes): New function.
2402 * c-typeck.c (c_last_sizeof_arg): New global variable.
2403 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2404
a5656b73 24052012-07-24 Uros Bizjak <ubizjak@gmail.com>
2406
2407 * c-lang.h (lang_decl): Add variable_size GTY option.
2408
b9ed1410 24092012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2410
2411 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2412 * Make-lang.in: Fix dependencies.
2413
e53d55e7 24142012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2415
2416 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2417 and add language Makefile hooks.
2418 * config-lang.in: New file.
2419 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2420 add the required "normal" config-lang.in rules.
2421 * c-lang.h: Moved from gcc/ to here.
2422 * c-tree.h: Likewise.
2423 * c-objc-common.c: Likewise.
2424 * c-objc-common.h: Likewise.
2425 * c-typeck.c: Likewise.
2426 * c-convert.c: Likewise.
2427 * c-lang.c: Likewise.
2428 * c-aux-info.c: Likewise.
2429 * c-errors.c: Likewise.
2430 * gccspec.c: Likewise.
2431 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2432 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2433\f
d353bf18 2434Copyright (C) 2012-2015 Free Software Foundation, Inc.
e53d55e7 2435
2436Copying and distribution of this file, with or without modification,
2437are permitted in any medium without royalty provided the copyright
2438notice and this notice are preserved.